其他分享
首页 > 其他分享> > supervisor如何使用

supervisor如何使用

作者:互联网

python -m pip install supervisor
安装的supersorvisor如果在/usr/local/python37/bin下面,将所有supervisor相关文件复制到/usr/bin下面即可正常使用
echo_supervisord_conf > /etc/supervisord.conf 生成配置文件
vi /etc/supervisord.conf 修改配置文件
添加服务
[program:serve1]
command=python /home/serve1.py --port=8887 ; the program (relative uses PATH, can take args)
umask=022                     ; umask for process (default None)
autostart=true                ; start at supervisord start (default: true)
startsecs=5                   ; # of secs prog must stay up to be running (def. 1)
startretries=3
如果已配置supervisor, 将服务重启
supervisorctl
restart serve1

 

标签:supervisor,supervisord,配置文件,start,serve1,如何,conf,使用
来源: https://www.cnblogs.com/cfld/p/16165060.html