supervisor使用总结,很使用的一些方法
apt-get install supervisor 安装
cd /etc/supervisor/conf.d/ 进入目录新建配置文件
vi laravel_m_htf.conf
配置文件
[program:laravel_m_htf]
process_name=%(program_name)s_%(process_num)02d
command=php /home/wwwroot/mhtf.haotoufa.com/m_htf/artisan queue:listen --tries=3
autostart=true
autorestart=true
numprocs=8
redirect_stderr=true
stdout_logfile=/home/wwwroot/mhtf.haotoufa.com/m_htf/storage/logs/m_htf_work.log
user=www
常用命令
sudo supervisorctl reread //重新读取
sudo supervisorctl update //更新进程
sudo supervisorctl start laravel_m_htf: //开启进程
supervisorctl stop laravel_m_htf: //停止进程