我想停止 Nginx 但它像这样失败了。
$ sudo service nginx stop
Stopping nginx: [FAILED]
Run Code Online (Sandbox Code Playgroud)
而nginx.conf
定义的地方nginx.pid有一条线。
# /etc/nginx/nginx.conf
pid /var/run/nginx.pid;
Run Code Online (Sandbox Code Playgroud)
但是nginx.pid
目录中没有/var/run/
。
locate nginx.pid
显示此输出。
/var/run/nginx.pid
/var/run/nginx.pid.oldbin
Run Code Online (Sandbox Code Playgroud)
但是搜索后updatedb
没有匹配项。我在CentOS release 6.5 (Final)
.
我应该怎么做才能停止 nginx 守护进程?
这是 的输出ps -ef | grep nginx
,似乎 nginx 守护进程仍在运行。
ironsand 17065 16933 0 15:55 pts/0 00:00:00 grep --color nginx
root 19506 1 0 2013 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
ironsand 19507 19506 0 2013 ? …
Run Code Online (Sandbox Code Playgroud) 根据文件,我应该替换chef-solo
为chef-client --local-mode
.
本地模式在 11.8 版本中被添加到厨师客户端。如果您正在运行该版本的 Chef-client(或更高版本),您应该考虑使用本地模式而不是使用 Chef-solo。 https://docs.getchef.com/ctl_chef_solo.html
我只是替换了命令并且工作正常。这两个命令是否总是可以替换而无需重新配置?或者有一些我应该知道的细微差别?