Comments on How to Build Nginx from source on CentOS 7
In this tutorial, we will build Nginx with all available modules in the open source version of Nginx and we will use the mainline version which is at 1.15.7 at the time of this writing. Update version numbers when newer versions become available.
6 Comment(s)
Comments
As a regular maintainer of RHEL'ish packages I can't recommend this tutorial, eventhough I have no doubts that it was written with good intentions.It's just that it is definitely not "best-practice" to manually compile and install software on a binary linux distribution. The way to go would have been to get the nginx.spec from the NGINX repo or EPEL repo src.rpm files and then compile those rpm packages via mock in a secure chroot environment. Or just obtain and install the mainline packages directly from the NGINX official repo...
Because we should trust whom better than the source?
So, what would you suggest someone like who is trying to add a dynamic module on centos7?
I installed nginx by using `yum install nginx` and when I compile a new module, it throws binary compatibility issue because nginx compiled by redhat I think.
One note: Instead of using sites-{available,enabled} (which is Debian-specific), any site configurations should be on conf.d.
Worked like a charm on Centos 7 with nginx already install with package manager. Compiled nginx with success, stopped nginx service then backed up all my config files ran make install. Then I ran "sudo ln -s /usr/lib64/nginx/modules /etc/nginx/modules" then I ran sudo nginx -t which produced a no such file error about var/cache/nginx I created the missing directory and now nginx is running with TLSv1.3 Awesome thank you!
sudo nginx -t gives me.....
nginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (2: No such file or directory)nginx: configuration file /etc/nginx/nginx.conf test failed
I did everything here but Im stuck now