CENTOS7 installation Supervisord
#yum-y Install Supervisor
Installation path/usr/bin/supervisord, configuration file/etc/supervisor.conf
First, manual start/close
Supervisor Manual Start:
#/usr/bin/supervisord-c/etc/supervisor.conf
Supervisor Manual Shutdown:
#/usr/bin/supervisorctl Stop all closes the Supervisor startup script before shutting down the Supervisord service
#kill PID
Supervisord Boot-up script (System-by-version): https://github.com/Supervisor/initscripts
Second, add start-up service:
CENTOS7 Boot-up script:
#vim/lib/systemd/system/supervisord.service
# Supervisord Service for SYSSTEMD (CentOS 7.0+)
# by Et-cs (Https://github.com/ET-CS)
[Unit]
Description=supervisor Daemon
[Service]
Execstart=/usr/bin/supervisord
Execstop=/usr/bin/supervisorctl $OPTIONS shutdown
Execreload=/usr/bin/supervisorctl $OPTIONS Reload
Killmode=process
Restart=on-failure
Restartsec=42s
[Install]
Wantedby=multi-user.target
This self-startup script needs to modify the/etc/supervisord.conf configuration file:
#vim/etc/supervisrod.conf
Nodaemon=false Change to True
Or: #vim/lib/systemd/system/supervisord.service
[Unit]
Description=process Monitoring and Control Daemon
After=rc-local.service
[Service]
Type=forking
Execstart=/usr/bin/supervisord-c/etc/supervisord.conf
sysvstartpriority=99
[Install]
Wantedby=multi-user.target
No need to modify the/etc/supervisord.conf configuration file
Both self-starting scripts can be added to the Systemctl self-starting service
#systemctl Enable Supervisord.service
#systemctl Start/restart/stop Supervisor.service
Supervisord install, start/close, add power-on self-start service