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

nginx基础17

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

使用新版本Nginx测试配置

代码语言:javascript
复制
[root@h102 sbin]# ./nginx -t -c /usr/local/nginx/conf/nginx.conf
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@h102 sbin]# 

平滑替换Nginx可执行程序

代码语言:javascript
复制
[root@h102 sbin]# kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`
[root@h102 sbin]# cat /usr/local/nginx/logs/nginx.pid
5651
[root@h102 sbin]# ll /usr/local/nginx/logs/
total 16
-rw-r--r-- 1 root root 2061 Oct  9 17:07 access.log
-rw-r--r-- 1 root root  419 Oct  9 20:23 error.log
-rw-r--r-- 1 root root    5 Oct  9 20:23 nginx.pid
-rw-r--r-- 1 root root    5 Oct  9 20:01 nginx.pid.oldbin
[root@h102 sbin]# cat /usr/local/nginx/logs/nginx.pid
5651
[root@h102 sbin]# cat /usr/local/nginx/logs/nginx.pid.oldbin 
5500
[root@h102 sbin]# ps faux | grep nginx 
root      5659  0.0  0.0 103256   824 pts/0    S+   20:24   0:00          \_ grep nginx
root      5500  0.0  0.0  24316   848 ?        Ss   20:01   0:00 nginx: master process sbin/nginx -c conf/nginx.conf
nobody    5501  0.0  0.0  24728  1244 ?        S    20:01   0:00  \_ nginx: worker process        
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  1252 ?        S    20:23   0:00      \_ nginx: worker process        
[root@h102 sbin]# 

本文系转载,前往查看

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

本文系转载前往查看

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

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 使用新版本Nginx测试配置
  • 平滑替换Nginx可执行程序
相关产品与服务
腾讯云服务器利旧
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档