您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

linux环境停止和启动nginx

2024/6/22 19:40:41发布38次查看
步骤1:查询nginx主进程号
ps -ef | grep nginx
在进程列表里 面找master进程,它的编号就是主进程号了。
步骤2:停止nginx
从容停止nginx:
kill -quit 主进程号
快速停止nginx:
kill -term 主进程号
强制停止nginx:
pkill -9 nginx
步骤3:启动nginx
环境1:
[root@iz25yepqfvvz /]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
[root@iz25yepqfvvz /]# ps -ef | grep nginx
root 18798 1 0 16:35 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
root 18799 18798 0 16:35 ? 00:00:00 nginx: worker process
root 18800 18798 0 16:35 ? 00:00:00 nginx: worker process
root 18801 18798 0 16:35 ? 00:00:00 nginx: worker process
root 18802 18798 0 16:35 ? 00:00:00 nginx: worker process
root 18827 15138 0 16:36 pts/1 00:00:00 grep nginx
环境2
[root@iz25yepqfvvz /]# /usr/sbin/nginx -c /etc/nginx/nginx.conf
[root@iz25knm9r1gz ~]# ps -ef | grep nginx
root 28969 1 0 16:50 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 28970 28969 0 16:50 ? 00:00:00 nginx: worker process
nginx 28971 28969 0 16:50 ? 00:00:00 nginx: worker process
nginx 28972 28969 0 16:50 ? 00:00:00 nginx: worker process
nginx 28974 28969 0 16:50 ? 00:00:00 nginx: worker process
root 29419 29401 0 17:11 pts/0 00:00:00 grep nginx
以上就介绍了linux环境停止和启动nginx,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product