yum install epel-release yum install -y supervisor
默认配置文件:/etc/supervisord.conf
进程管理配置文件放到:/etc/supervisord.d/目录下即可
进程配置文件如下实例:
[program:test-server] process_name=%(program_name)s command = /home/ directory = /home/test-server autostart = true startsecs = 5 autorestart = true startretries = 3 user = root redirect_stderr = true stdout_logfile_maxbytes = 20MB stdout_logfile_backups = 10 stdout_logfile = /var/log/test-server.log
supervisorctr restart start stop 等等