centos7下supervisor的安装和配置简记

centos7下supervisor的安装和配置简记

详情参考:
https://blog.csdn.net/donggege214/article/details/80264811
http://www.diaoyuf.com


安装:
yum install epel-release
yum install -y supervisor
systemctl enable supervisord # 开机自启动
systemctl start supervisord # 启动supervisord服务

systemctl status supervisord # 查看supervisord服务状态
ps -ef|grep supervisord # 查看是否存在supervisord进程

如果修改了supervisor的配置的话,需要用以下命令去重载配置
supervisorctl reload

配置:
[program:apimonitor]
directory = /usr/local/webapp/src/apimonitor #supervisor会进入该目录执行命令
command = /usr/local/webapp/src/apimonitor/apimonitor #supervisor最终执行的命令
autostart = true
autorestart=true
startsecs = 2
user = root
redirect_stderr = true
stdout_logfile = /data/logs/apimonitor/server.log #执行命令日志

你可能感兴趣的:(运维,supervisor,钓鱼疯)