linux系统进行supervisor安装使用
作者:互联网
1.yum安装
# yum install epel-release
# yum install -y supervisor
# systemctl enable supervisord # 开机自启动
# systemctl start supervisord # 启动supervisord服务
# systemctl status supervisord # 查看supervisord服务状态
# ps -ef|grep supervisord # 查看是否存在supervisord进程
2.修改配置文件
/etc/supervisord.conf
在/etc/supervisord/添加配置*.ini文件
3.ini配置文件
[program:receive_cloud]
directory = /data/www/sync_queue
command= php receive_biz_cloud.php
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
autostart=true
#startretries=10
exitcodes=0
#stopsignal=QUIT
stopwaitsecs=10
redirect_stderr=true
stderr_logfile=/var/log/php/receive_cloud.log
stdout_logfile=/var/log/php/receive_cloud.log域名
4.基本操作
supervisorctl reload 全部重启
supervisorctl update 新添加ini文件更新配置
supervisorctl reread 更新配置文件
supervisorctl start projectname 启动项目
supervisorctl restart projectname 重启项目
supervisorctl stop projectname 关闭项目
supervisorctl status 进程底下所有能应用的进程
标签:supervisor,supervisord,supervisorctl,name,linux,php,安装,cloud,log 来源: https://www.cnblogs.com/ytshit/p/15820846.html