安装
dnf update -y
dnf install supervisor
sytemctl enable supervisord
配置
vim /etc/supervisor/xxx.conf
[program:testprogram]
directory = /root/go/src/test
command = /root/go/src/test/bin/server
autostart = true
startsecs = 5
autorestart = true
startretries = 3
user = root
redirect_stderr = true
stdout_logfile = /var/log/supervisor/test.log
使用
supervisorctl reload
supervisorctl start xxx
supervisorctl status
Copy
本条目发布于[2019年8月16日](https://c4ys.com/archives/1909 "22:56")。属于[Linux](Tools(https://c4ys.com/archives/category/tools)分类,被贴了 [CentOS](supervisor(https://c4ys.com/archives/tag/supervisor) 标签。