Find the nginx installation source code root directory. If not, download the new source code.
Http://nginx.org
Tar xvzf nginx-1.3.2.tar.gz
View ngixn extremely compiled parameters
/Usr/local/nginx/sbin/nginx-V
Go to the nginx Source Code Directory
Cd nginx-1.3.2
Below are the re-compiled code and modules
./Configure -- prefix =/usr/local/nginx -- with-http_stub_status_module -- with-http_ssl_module -- with-file-aio -- with-http_realip_module
Make never make install. Otherwise, the installation will be overwritten.
After make is complete, nginx is added to the objs Directory. This is the new version of the program.
Back up old nginx programs
Cp/usr/local/nginx/sbin/nginx. bak
Overwrite the old nginx program
Cp objs/nginx/usr/local/nginx/sbin/nginx
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
Restart nginx smoothly
/Usr/local/nginx/sbin/nginx-s reload
View ngixn extremely compiled parameters
/Usr/local/nginx/sbin/nginx-V
Here is the code I re-compiled:
. /Configure -- prefix =/usr/local/nginx -- with-google_perftools_module -- user = www -- group = www -- with-http_stub_status_module -- with-http_gzip_static_module -- with-openssl =/usr/-- with-pcre =/mydata /soft/pcre-8.31