Nginx平滑升级Tengine保留status

wget -c http://tengine.taobao.org/download/tengine-1.4.2.tar.gz
tar zxvf tengine-1.4.2.tar.gz
cd tengine-1.4.2
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-ipv6
make
mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
rm -rf /usr/local/nginx/sbin/nginx
cp -r objs/nginx /usr/local/nginx/sbin/nginx
/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`
/etc/init.d/nginx  restart
/usr/local/nginx/sbin/nginx -v

更新于2012年12月14日

发表回复