centos7 配置supervisor

转载https://blog.csdn.net/StriverFeng/article/details/80057304

注意点:
1、分号是注释,我忘了打开[include]配置导致我的配置没生效
2、supervisorctl
[supervisorctl]
serverurl=unix:///etc/supervisor/supervisord.sock ; use a unix:// URL for a unix socket

[unix_http_server]
file=/etc/supervisor/supervisord.sock ; the path to the socket file

这两个地方的配置必须一样才可以生效

1) 查看所有子进程的状态:

supervisorctl status

在这里插入图片描述
blog RUNNING pid 2395, uptime 0:08:41
zhoujy RUNNING pid 2396, uptime 0:08:41
2)关闭、开启指定的子进程:

supervisorctl stop nginx

zhoujy: stopped

supervisorctl start nginx

zhoujy: started
3)关闭、开启所有的子进程:

supervisorctl stop all

blog: stopped
zhoujy: stopped

supervisorctl start all

4):其他参数:supervisor开启后子进程自动开启(autostart=true)和子进程退出后自动启动(autorestart=ture)

猜你喜欢

转载自blog.csdn.net/u011840205/article/details/85252496