知识点049-supervisor

纵饮孤独 提交于 2019-12-09 22:18:50

supervisor安装

cd /usr/local/src
wget https://pypi.python.org/packages/7b/17/88adf8cb25f80e2bc0d18e094fcd7ab300632ea00b601cbbbb84c2419eae/supervisor-3.3.2.tar.gz
tar -zxvf supervisor-3.3.2.tar.gz
cd supervisor-3.3.2
python setup.py install #本地python版本为python2.7
# python2.7 setup.py install #本地python版本为python3以上

supervisor的功能是对进程的拉取以及监听

生成配置文件
echo_supervisord_conf > /etc/supervisord.conf
  • 启动 supervisord -c /etc/supervisord.conf

常用的启停命令

sudo service supervisor stop 停止supervisor服务
sudo service supervisor start 启动supervisor服务
supervisorctl shutdown #关闭所有任务
supervisorctl stop|start program_name #启动或停止服务
supervisorctl status #查看所有任务状态
supervisorctl -c supervisor.xxxx.conf status all #查看某服务的所有状态
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!