1、supervisor安裝文件,安裝命令為:sh supervisor_install.sh
在望江等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場(chǎng)前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站建設(shè)、成都網(wǎng)站制作 網(wǎng)站設(shè)計(jì)制作按需定制,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),品牌網(wǎng)站設(shè)計(jì),網(wǎng)絡(luò)營(yíng)銷推廣,成都外貿(mào)網(wǎng)站建設(shè)公司,望江網(wǎng)站建設(shè)費(fèi)用合理。#!/bin/bash
yum -y install python-setuptools
easy_install 'supervisor==3.3.4'
echo "alias 'supervisorctl'='supervisorctl -c /opt/superctl/etc/supervisor.conf'" >> ~/.bashrc
mkdir -p /opt/superctl/bin/
mkdir -p /opt/superctl/log/
mkdir -p /opt/superctl/etc/
chmod -R 755 /opt/superctl/bin/
chmod 755 /opt/superctl/supervisor.sh
cd /opt/superctl/etc/
cat > supervisor.conf << EOF
[unix_http_server]
file=/opt/superctl/log/supervisord.sock
[inet_http_server]
port=127.0.0.1:9001
[supervisord]
logfile=/opt/superctl/log/supervisord.log
logfile_maxbytes=20MB
logfile_backups=10
loglevel=info
pidfile=/opt/superctl/log/supervisord.pid
nodaemon=false
minfds=60000
minprocs=200
#directory=/opt/superctl/
childlogdir=/opt/superctl/log/
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///opt/superctl/log/supervisord.sock ; use a unix:// URL for a unix socket
[include]
files = /opt/superctl/etc/*.supervisor
EOF
cat > test.supervisor.temple << EOF
[program:test]
command = /bin/bash /opt/superctl/bin/test_start.sh
autostart = true
autorestart = true
stdout_logfile = /opt/superctl/log/test-stdout.log
stderr_logfile = /opt/superctl/log/test-stderr.log
stdout_logfile_maxbytes = 500MB
stdout_logfile_backups = 50
stdout_capture_maxbytes = 1MB
stdout_events_enabled = false
loglevel = info
priority = 1
stopasgroup = true
EOF
2、在superctl目錄下添加supervisor.sh文件
#
# chkconfig: 2345 12 80
# 配置文件:/opt/superctl/etc/supervisor.conf
#
source ~/.bashrc
PATH=/sbin:/usr/sbin:$PATH
usage ()
{
echo $"Usage: $0 {start|stop|status|restart}" 1>&2
RETVAL=2
}
start ()
{
if [ -e /opt/superctl/etc/supervisor.conf ] ;then
if [ `ps -ef|grep "/opt/superctl/etc/supervisor.conf"|grep -v grep|wc -l` -ne 0 ];then
sleep 1
echo "/opt/superctl/etc/supervisor.conf 進(jìn)程正在運(yùn)行"
ps -ef|grep " /opt/superctl/etc/supervisor.conf"|grep -v grep
else
sleep 1
/bin/supervisord -c /opt/superctl/etc/supervisor.conf
fi
fi
}
stop ()
{
if [ `ps -ef|grep " /opt/superctl/etc/supervisor.conf"|grep -v grep|wc -l` -eq 1 ];then
supervisorctl stop all
sleep 4
/bin/supervisorctl shutdown
fi
}
status ()
{
/bin/supervisorctl status
}
restart ()
{
stop
sleep 3
start
}
case "$1" in
stop) stop ;;
status) status ;;
restart) restart ;;
start) start ;;
*) usage ;;
esac
exit $RETVA
3、啟動(dòng)命令:
sh supervisor.sh start|stop|restart
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
網(wǎng)站標(biāo)題:安裝supervisor-創(chuàng)新互聯(lián)
新聞來源:http://jinyejixie.com/article48/dhdeep.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供小程序開發(fā)、ChatGPT、軟件開發(fā)、全網(wǎng)營(yíng)銷推廣、域名注冊(cè)、網(wǎng)頁(yè)設(shè)計(jì)公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容