Plone技术资料

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2010|回复: 0

CentOS7 配置supervisord 自动启动过程

[复制链接]
发表于 2019-7-14 07:29:36 | 显示全部楼层 |阅读模式
1、建立supervisord.service文件
  1. sudo touch /etc/systemd/system/supervisord.service
复制代码
输入如下内容:
  1. <p><font style="background-color: rgb(255, 255, 255);"># systemd service file for Supervisor Monitor server
  2. #</font></p><p><font style="background-color: rgb(255, 255, 255);">[Unit]
  3. Description=Supervisor Monitor
  4. After=network.target
  5. After=syslog.target</font></p><p><font style="background-color: rgb(255, 255, 255);">[Install]
  6. WantedBy=multi-user.target</font></p><p><font style="background-color: rgb(255, 255, 255);">[Service]
  7. User=root
  8. Group=root
  9. PIDFile=/home/plone/workspace/Plone5sites/sites/var/supervisord.pid</font></p><p><font style="background-color: rgb(255, 255, 255);"># Disable service start and stop timeout logic of systemd for supervisor service.
  10. TimeoutSec=0
  11. Type=forking
  12. # Start main service
  13. ExecStart=/home/demo/workspace/Plone5sites/sites/bin/supervisord
  14. ExecStop=/home/demo/workspace/Plone5sites/sites/bin/supervisorctl shutdown</font></p><p><font style="background-color: rgb(255, 255, 255);">StartLimitBurst=2
  15. StartLimitInterval=30
  16. Restart=on-failure
  17. PrivateTmp=false
  18. </font></p>
复制代码

更改权限:
  1. sudo chmod +x /etc/systemd/system/supervisord.service
复制代码
载入系统,并开启supervisord:
  1. sudo systemctl daemon-reload
  2. sudo systemctl start supervisord.service
复制代码
测试:
  1. sudo systemctl status supervisord.service
  2. sudo systemctl stop supervisord.service
复制代码
允许自启动:
  1. sudo systemctl enable supervisord.service
复制代码






回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|Plone技术资料 ( 湘ICP备14006519号-1 )

GMT+8, 2019-12-8 19:28 , Processed in 0.043837 second(s), 14 queries , Gzip On.

Powered by Plone! X3.4

© 2001-2019 Plone.org.

快速回复 返回顶部 返回列表