Suming

LNMP:Nginx 平滑升级 tengine

Written By

安装 tengine 备份nginx配置文件:

wget -c http://tengine.taobao.org/download/tengine-2.2.0.tar.gz
tar zxvf tengine-2.2.0.tar.gz
cd tengine-2.2.0
./configure
make
mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
cp -r objs/nginx /usr/local/nginx/sbin/nginx

vim /usr/local/nginx/conf/nginx.conf

删除如下代码:

location /status {

stub_status on;

access_log off;

}

检测是否正常:

/usr/local/nginx/sbin/nginx -t

提示“the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful”为正常

重启nginx:

kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`
kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`
/etc/init.d/nginx stop
/etc/init.d/nginx start

查看nginx版本:

/usr/local/nginx/sbin/nginx -v

Suming

不要走到山沟沟里,不要说一堆假大空.. 先想在做,先做再说..

一条回应:“LNMP:Nginx 平滑升级 tengine”

发表评论

电子邮件地址不会被公开。 必填项已用*标注