[root@lnmp nginx-1.16.0]# cd /usr/local/nginx/sbin/
[root@lnmp sbin]# ls
nginx nginx.old
[root@lnmp sbin]# ./nginx -v
nginx version: nginx/1.16.0
[root@lnmp sbin]# ./nginx.old -v
nginx version: nginx/1.14.2
[root@lnmp sbin]#
操作示范:
[root@lnmp sbin]# cat /usr/local/nginx/logs/nginx.pid
1016
[root@lnmp sbin]# ps aux | grep nginx
root 1016 0.0 0.0 45964 1144 ? Ss 11月06 0:00 nginx: master process /usr/local/nginx/sbin/nginx
www 1019 0.0 0.0 46420 2148 ? S 11月06 0:00 nginx: worker process
root 113580 0.0 0.0 112824 984 pts/0 R+ 16:28 0:00 grep --color=auto nginx
[root@lnmp sbin]# kill -USR2 1016
[root@lnmp sbin]# ps aux | grep nginx
root 1016 0.0 0.0 45964 1328 ? Ss 11月06 0:00 nginx: master process /usr/local/nginx/sbin/nginx
www 1019 0.0 0.0 46420 2148 ? S 11月06 0:00 nginx: worker process
root 114643 0.0 0.0 45988 3372 ? S 16:31 0:00 nginx: master process /usr/local/nginx/sbin/nginx
www 114644 0.0 0.0 46452 1904 ? S 16:31 0:00 nginx: worker process
root 114658 0.0 0.0 112824 988 pts/0 R+ 16:31 0:00 grep --color=auto nginx
[root@lnmp sbin]# kill -WINCH 1016
[root@lnmp sbin]# ps aux | grep nginx
root 1016 0.0 0.0 45964 1328 ? Ss 11月06 0:00 nginx: master process /usr/local/nginx/sbin/nginx
root 114643 0.0 0.0 45988 3372 ? S 16:31 0:00 nginx: master process /usr/local/nginx/sbin/nginx
www 114644 0.0 0.0 46452 2148 ? S 16:31 0:00 nginx: worker process
root 115501 0.0 0.0 112824 988 pts/0 R+ 16:34 0:00 grep --color=auto nginx
下一篇:安装 Wails