19 / 09 / 18
CentOS7.x
# sudo su - #切换为root用户
# yum install epel-release
# yum install -y supervisor
# systemctl enable supervisord # 开机自启动
# systemctl start supervisord # 启动supervisord服务
# systemctl status supervisord # 查看supervisord服务状态
# ps -ef|grep supervisord # 查看是否存在supervisord进程
# mkdir /etc/supervisord.d/
# echo_supervisord_conf > /etc/supervisord.conf
[include]
files = /etc/supervisord.d/*.ini
# supervisord -c /etc/supervisord.conf
Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting
find / -name supervisor.sock
unlink /tmp/supervisor.sock
[program:server_version]
command=/usr/local/gopath/bin/version_pro
autostart=true
autorestart=true
startsecs=10
stdout_logfile=/var/log/supervisord/version.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile=/var/log/supervisord/version.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB