1.supervisor安裝
apt-get install supervisor
2.編寫php配置檔案,檔名為.conf
command=/usr/bin
/php -f /var
/www/
;process_name=%(process_num)
02d
;numprocs=5
#啟動幾個程序
autostart=true
#隨著supervisord的啟動而啟動
autorestart=true
#自動啟動
startsecs=1
#程式重啟時候停留在runing狀態的秒數
startretries=10
#啟動失敗時的最多重試次數
redirect_stderr=true
#重定向stderr到stdout
stdout_logfile=/var/www
user=daemon
[supervisord]
[supervisorctl]
3.將檔案放入/etc/supervisor/conf.d/下面
4.重啟服務 update 有問題,以後有時間再重點解決
root@iz252f8y3biz:/# service supervisor start
starting supervisor: error: .ini file does not include supervisord section
for help, use /usr/bin/supervisord -h
service supervisor restart
5.檢視程序 supervisor守護跑php指令碼後台長期執行
1.supervisor安裝 apt get install supervisor2.編寫php配置檔案,檔名為.conf process name process num 02d numprocs 5 啟動幾個程序 autostart true 隨著supervisord的啟動而啟動 autore...
守護程序 supervisor
安裝 yum install superviosr 如果提示 缺少 epel release 則要先安裝 yum install epel release 啟動supervisor supervisord c etc supervisord.conf supervisorctl c etc supe...
Supervisor 程序守護
先看下本機是否有 我的本機已經有了。root a1 supervisord.d whereis supervisord supervisord usr bin supervisord etc supervisord.d etc supervisord.conf root a1 supervisord...