本篇內(nèi)容介紹了“手動安裝supervisor進(jìn)程守護(hù)的方法步驟”的有關(guān)知識,在實(shí)際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
創(chuàng)新互聯(lián)公司專注于永定企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站設(shè)計(jì),商城網(wǎng)站定制開發(fā)。永定網(wǎng)站建設(shè)公司,為永定等地區(qū)提供建站服務(wù)。全流程按需定制設(shè)計(jì),專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)公司專業(yè)和態(tài)度為您提供的服務(wù)
正文開始:
安裝supervisor
1.1.安裝python的setuptools庫
yum install python-setuptools
1.2.通過setuptools中的 easy_install
安裝supervisor
easy_install supervisor
創(chuàng)建配置文件(兩種方法都可以)
2.1. vi /etc/supervisor.conf
2.2. 命令 echo_supervisord_conf > /etc/supervisor.conf
修改配置文件 3.1. 在主配置文件最后增加
[include] files = /www/server/supervisor/profile/*.ini
3.2. 在/www/server/supervisor/profile/
路徑下創(chuàng)建子配置文件并添加信息(守護(hù)進(jìn)程) 3.3. 創(chuàng)建swoole守護(hù) vim merchant_swoole.ini
;監(jiān)控程序名字 [program:merchant-swoole] process_name=%(program_name)s_%(process_num)02d ;要用 supervisor 管理的程序指令 command=php /data/www/crmeb_merchant/think swoole restart ;是否自動啟動 autostart=true ;是否自動重啟動 autorestart=true numprocs=8 ;是否重定向錯(cuò)誤 redirect_stderr=true ;重定向到指定路徑的日志文件 stdout_logfile=/data/www/supervisor.log
3.4. 創(chuàng)建隊(duì)列守護(hù) vim merchant_swoole.ini
;監(jiān)控程序名字 [program:merchant-queue] process_name=%(program_name)s_%(process_num)02d ;要用 supervisor 管理的程序指令 command=php /data/www/crmeb_merchant/think queue:work --tries=3 ;是否自動啟動 autostart=true ;是否自動重啟動 autorestart=true numprocs=8 ;是否重定向錯(cuò)誤 redirect_stderr=true ;重定向到指定路徑的日志文件 stdout_logfile=/data/www/supervisor.log
查看是否啟動守護(hù)進(jìn)程 ps -ef | grep think
501 84001 83800 0 9:40上午 ttys002 0:00.70 php /Users/inuo/Code/Work/crmeb_merchant/think queue:work --tries 501 84197 84004 0 10:04上午 ttys003 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox think 501 84165 84122 0 10:04上午 ttys004 0:00.12 php /Users/inuo/Code/Work/crmeb_merchant/think swoole restart 501 84166 84165 0 10:04上午 ttys004 0:00.01 php /Users/inuo/Code/Work/crmeb_merchant/think swoole restart
這里就可以看到,已經(jīng)啟動了。
“手動安裝supervisor進(jìn)程守護(hù)的方法步驟”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!
分享名稱:手動安裝supervisor進(jìn)程守護(hù)的方法步驟
文章分享:http://aaarwkj.com/article8/pcohip.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計(jì)、、域名注冊、網(wǎng)站營銷、網(wǎng)頁設(shè)計(jì)公司、商城網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)