Supervisor 環境搭建

ough發表於2020-02-12

Supervisor環境搭建

廢話少說,上乾貨

進入centos介面輸入:
安裝基於python環境

pip install supervisor
echo_supervisord_conf

可以自己指定/etc/supervisord.conf,這裡就用 /etc/supervisord.conf

echo_supervisord_conf > /etc/supervisord.conf
vim /etc/supervisord.conf

拉倒最下面,新增兩行

[include]
files = /etc/supervisor/*.conf

到這個目錄下:/etc/supervisor新增一個test.conf的檔案

[program:beepkg]
directory = /opt/app/beepkg
command =php 專案路徑/artisan queue:work
autostart = true
startsecs = 5
user = root
redirect_stderr = true
stdout_logfile = /var/log/supervisord/beepkg.log

大家也可以使用這個supervisord更全面:https://blog.csdn.net/woshixiaosimao/artic...
完成!

本作品採用《CC 協議》,轉載必須註明作者和本文連結