前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >nginx基础19

nginx基础19

作者头像
franket
发布2022-05-12 23:11:45
7600
发布2022-05-12 23:11:45
举报
文章被收录于专栏:技术杂记技术杂记

重新启动旧版本Nginx worker进程

代码语言:javascript
复制
[root@h102 sbin]# kill -HUP `cat /usr/local/nginx/logs/nginx.pid.oldbin` 
[root@h102 sbin]# ps fuax | grep nginx 
root      5748  0.0  0.0 103256   828 pts/0    S+   20:49   0:00          \_ grep nginx
root      5500  0.0  0.0  24316   852 ?        Ss   20:01   0:00 nginx: master process sbin/nginx -c conf/nginx.conf
root      5651  0.0  0.0  24316  1820 ?        S    20:23   0:00  \_ nginx: master process sbin/nginx -c conf/nginx.conf
nobody    5653  0.0  0.0  24740  1532 ?        S    20:23   0:00  |   \_ nginx: worker process        
nobody    5746  0.0  0.0  24728  1244 ?        S    20:49   0:00  \_ nginx: worker process        
[root@h102 sbin]# 

彻底关闭旧版本Nginx worker进程

代码语言:javascript
复制
[root@h102 sbin]# kill -WINCH `cat /usr/local/nginx/logs/nginx.pid.oldbin` 
[root@h102 sbin]# ps fuax | grep nginx 
root      5759  0.0  0.0 103256   828 pts/0    S+   20:52   0:00          \_ grep nginx
root      5500  0.0  0.0  24316   852 ?        Ss   20:01   0:00 nginx: master process sbin/nginx -c conf/nginx.conf
root      5651  0.0  0.0  24316  1820 ?        S    20:23   0:00  \_ nginx: master process sbin/nginx -c conf/nginx.conf
nobody    5653  0.0  0.0  24740  1532 ?        S    20:23   0:00      \_ nginx: worker process        
[root@h102 sbin]# kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin` 
[root@h102 sbin]# ps fuax | grep nginx 
root      5762  0.0  0.0 103256   828 pts/0    S+   20:52   0:00          \_ grep nginx
root      5651  0.0  0.0  24316  1820 ?        S    20:23   0:00 nginx: master process sbin/nginx -c conf/nginx.conf
nobody    5653  0.0  0.0  24740  1532 ?        S    20:23   0:00  \_ nginx: worker process        
[root@h102 sbin]# 

版本切换成功,整个切换过程服务都是可用状态

Tip: 有没有注意到其实我是在进行版本降级 从 nginx-1.9.5 降到了 nginx-1.8.0 ,所以其实和版本是否更新无关,可以更新也可以更旧


原文地址http://soft.dog/2015/10/09/nginx-basic/

本文系转载,前往查看

如有侵权,请联系?cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系?cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 重新启动旧版本Nginx worker进程
  • 彻底关闭旧版本Nginx worker进程
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
http://www.vxiaotou.com