supervisor部署与配置开机自启动
supervior安装
wget https://pypi.python.org/packages/source/s/supervisor/supervisor-3.1.3.tar.gz
tar zxvf supervisor-3.1.3.tar.gz
python setup.py install
初始化配置文件
echo_supervisord_conf
echo_supervisord_conf > /etc/supervisord.conf
进入目录
cd /usr/lib/systemd/system
创建自启动配置文件
vim supervisord.service
[Unit]
Description=Supervisor daemon
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf
ExecStop=/usr/bin/supervisorctl shutdown
ExecReload=/usr/bin/supervisorctl reload
KillMode=process
Restart=on-failure
RestartSec=42s
[Install]
WantedBy=multi-user.target
确认状态
systemctl status supervisord
启动
systemctl start supervisord
加入开机启动
systemctl enable supervisord