# cd /usr/local/nginx/
# sbin/nginx -V #查看版本
[root@vps nginx]# sbin/nginx -V
nginx version: nginx/0.7.65
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
TLS SNI support disabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module //注意这里的编译项
# cd
#wget http://www.nginx.org/download/nginx-0.8.53.tar.gz
#tar zxvf nginx-0.8.53.tar.gz
#cd nginx-0.8.53
#./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module //按原来的选项configure
#make //注意只make 不要make install
#mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
#cd objs/
#cp nginx /usr/local/nginx/sbin/
#/usr/local/nginx/sbin/nginx -t
#kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`
#kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`
#/usr/local/nginx/sbin/nginx -v
#cd ..
#cd ..
#rm -rf nginx-0.8.53
#rm -rf nginx-0.8.53.tar.gz
最后重启nginx

 

重新安装下pcre
[root@datacenter sbin]# cd /home/php
[root@datacenter php]# tar xzvf pcre-8.02.tar.gz
[root@datacenter php]# cd pcre-8.02
[root@datacenter pcre-8.02]# ./configure
[root@datacenter pcre-8.02]# make && make install
[root@datacenter pcre-8.02]# cd ..
[root@datacenter php]# tar xzvf nginx-0.8.37.tar.gz
[root@datacenter php]# cd nginx-0.8.37
[root@datacenter nginx-0.8.37]# ./configure --prefix=/home/php/nginx --with-http_stub_status_module --with-pcre=/home/php/pcre-8.02 #查看nginx版本的时候直接复制configure arguments
[root@datacenter nginx-0.8.37]# make
[root@datacenter nginx-0.8.37]# mv /home/php/nginx/sbin/nginx /home/php/nginx/sbin/nginx.old
[root@datacenter nginx-0.8.37]# cp objs/nginx /home/php/nginx/sbin
[root@datacenter nginx-0.8.37]# make upgrade
[root@datacenter nginx-0.8.37]# cd ../nginx/sbin
[root@datacenter nginx-0.8.37]# nginx -V