1.将新版本nginx编译安装到旧版本的nginx路径中(注意备份)
2.发送USR2指令:kill -USR2 [nginx主进程]
kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`
3.将旧版本nginx主进程nginx.pid重命名为nginx.pid.oldbin,然后从容关闭旧的nginx 子进程,再关闭旧的ningx主进程
cd /usr/local/nginx/logs/
mv nginx.pid nginx.pid.oldbin
kill -WINCH `cat /usr/local/nginx/logs/nginx.pid.oldbin`
kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`