Centos添加supervisor为服务,启动/关闭,设置开机启动服务

86201746 2019-06-28

关于Supervisor的安装与配置,请参考 Supervisor,进程管理利器。 让程序后台运行! 。

Supervisor设置开机启动有很多,这里以Centos为例,仅供参考!

根据不同的系统,有不同的脚本,参考 https://github.com/Supervisor...

这里以Centos为例,我们选择:

https://github.com/Supervisor...

vim /etc/init.d/supervisord

将上述地址文件内容拷贝到 vim /etc/init.d/supervisord ,将第32行

PIDFILE=/var/run/supervisord.pid

改为:

PIDFILE=/tmp/supervisord.pid

保存后就可以添加至服务并设置开机启动啦。

chkconfig --add supervisord
chkconfig supervisord --level 345 on

启动、关闭、重启supervisord 命令

service supervisord start
service supervisord stop
service supervisord restart

最后,supervisor 的更多用法,请参考 官方文档

更多内容,请查看原文:http://www.tech1024.com/origi...

相关推荐

Sophisticated / 0评论 2019-06-29