supervisor:要安装的软件的名称。
supervisord:装好supervisor软件后,supervisord用于启动supervisor服务。
supervisorctl:用于管理supervisor配置文件中program。

使用yum命令安装supervisor

$ sudo su – #切换为root用户
# yum install epel-release
# yum install -y supervisor
# systemctl enable supervisord # 开机自启动
# systemctl start supervisord # 启动supervisord服务
# systemctl status supervisord # 查看supervisord服务状态

[root@VM_0_8_centos ~]# systemctl status supervisord
● supervisord.service - Process Monitoring and Control Daemon
   Loaded: loaded (/usr/lib/systemd/system/supervisord.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-06-24 21:51:45 CST; 13min ago
  Process: 3341 ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf (code=exited, status=0/SUCCESS)
 Main PID: 3611 (supervisord)
   CGroup: /system.slice/supervisord.service
           └─3611 /usr/bin/python /usr/bin/supervisord -c /etc/supervisord.conf

# ps -ef|grep supervisord # 查看是否存在supervisord进程

[root@VM_0_8_centos ~]# ps -ef|grep supervisord
root      3611     1  0 21:51 ?        00:00:00 /usr/bin/python /usr/bin/supervisord -c /etc/supervisord.conf
root      5588  5369  0 22:03 pts/0    00:00:00 grep --color=auto supervisord

supervisor配置文件
/etc/supervisord.conf

停止命令
supervisorctl shutdown

发表评论

邮箱地址不会被公开。 必填项已用*标注