大家好,又见面了,我是你们的朋友全栈君。
目录
0.补充有关于centos7中nginx开机自启动内容,跳转地址如下:
一、启动/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
(2)杀死进程: kill -term xxxx/ kill -int xxxx
(1)方法一:进入nginx安装目录sbin下,输入命令./nginx -t
(1)方法一:进入nginx安装目录sbin下,输入命令./nginx -s reload 即可
(2)方法二:查找当前nginx进程号,然后输入命令:kill -HUP 进程号 实现重启nginx服务
Centos7.8设置nginx开机自启动/nginx启动、停止、查看版本等命令汇总_乞力马扎罗の黎明的博客-CSDN博客_centos nginx开机自启
启动代码格式:nginx安装目录地址 -c nginx配置文件地址
例如:
[root@localhost ~]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nginx的停止有三种方式:
[root@localhost ~]# ps -ef|grep nginx
142804是进程的编号
[root@localhost ~]# kill -quit 142804
[root@localhost ~]# ps -ef|grep nginx
142804是进程的编号
[root@localhost ~]# kill -term 142804
或
[root@localhost ~]# kill -int 142804
[root@localhost ~]# pkill -9 nginx
看到如下显示nginx.conf syntax is ok
nginx.conf test is successful
说明配置文件正确!
[root@localhost ~]# cd /usr/local/nginx/sbin
[root@localhost sbin]# ./nginx -t
[root@localhost sbin]# /usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
[root@localhost ~]# cd /usr/local/nginx/sbin
[root@localhost sbin]# ./nginx -s reload
—-以下无正文
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/170264.html原文链接:https://javaforall.cn
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有