一、编写服务
nano /usr/lib/systemd/system/supervisord.service
==================内容开始===============
[Unit]
Description=Process Monitoring and Control Daemon
After=rc-local.service nss-user-lookup.target
[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 enable supervisord
sudo systemctl start supervisord