Nginx Add module (non-overlay installation)
Already installed Nginx, now need to add a module that has not been compiled to install:
See what parameters were originally compiled with
#/usr/local/nginx/sbin/nginx-v
Nginx version:nginx/1.8.1
Built by GCC 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
Configure arguments:--prefix=/usr/local/nginx--with-http_realip_module--with-http_sub_module--with-http_gzip_ Static_module--with-http_stub_status_module--with-pcre
Enter Nginx Source Directory
#cd nginx-1.3.2
Added parameters (add the compiled modules that have been previously, or only the newly compiled modules)
#./configure--prefix=/usr/local/nginx--with-http_realip_module--with-http_sub_module--with-http_gzip_static_ Module--with-htule--with-pcre--with-http_ssl_module
Compile
#make {Do not install or overwrite the installation}
After make finished in the OBJS directory has a nginx, this is the new version of the program
Replace Nginx binary file
#cp/usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx.bak
#cp./objs/nginx/usr/local/nginx/sbin/
Test whether the new Nginx program is correct
#/usr/local/nginx/sbin/nginx-t
Nginx:theconfiguration file/usr/local/nginx/conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/nginx/conf/nginx.conf Test Issuccessful
Smooth restart Nginx
/usr/local/nginx/sbin/nginx-s Reload
View Ngixn version Extreme compilation parameters
/usr/local/nginx/sbin/nginx-v
Nginx version:nginx/1.8.1
Built by GCC 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
Built with OpenSSL 1.0.1e-fips 2013
TLS SNI Support Enabled
Configure arguments:--prefix=/usr/local/nginx--with-http_realip_module--with-http_sub_module--with-http_gzip_ Static_module--with-http_stub_status_module--with-pcre--with-http_ssl_module
Nginx Add module (non-overlay installation)