码迷,mamicode.com
首页 > 其他好文 > 详细

supervisor自启动

时间:2018-09-30 10:11:18      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:注意   kill   logs   cal   emctl   another   system   auto   not   

supervisor自启动
其实自启动,也就是在主机开启的时候,执行了sudo supervisord -c /etc/supervisord.conf
创建/usr/lib/systemd/system/supervisord.service文件;
写入:
# dservice for systemd (CentOS 7.0+)
# by ET-CS (https://github.com/ET-CS)
[Unit]
Description=Supervisor daemon

[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
ExecStop=/usr/bin/supervisorctl shutdown
ExecReload=/usr/bin/supervisorctl reload
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

*注意:我的supervisord的目录是/usr/local/bin/supervisord,需要把上边目录修改;
将文件拷贝至:“/usr/lib/systemd/system/supervisord.service”
systemctl enable supervisord

 
技术分享图片
clip_image001

验证一下是否为开机启动:systemctl is-enabled supervisord
 
技术分享图片
clip_image002

 

Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting

解决方法:

find / -name supervisor.sock

unlink /name/supervisor.sock

unix:///var/run/supervisor.sock no such file

sudo touch /var/run/supervisor.sock
sudo chmod 777 /var/run/supervisor.sock
sudo service supervisor restart

 

supervisor自启动

标签:注意   kill   logs   cal   emctl   another   system   auto   not   

原文地址:https://www.cnblogs.com/liqing1009/p/9728113.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!