centos6安装supervisor

参考:http://www.jianshu.com/p/2008cf9f7ee7

因为被墙,easy_install supervisor一直不成功提示:No local packages or download links found for meld3>=0.6.5

1安装

1
2
3
4
5
6
7
8
9
wget https: //pypi .python.org /packages/0f/5e/3a57c223d8faba2c3c2d69699f7e6cfdd1e5cc31e79cdd0dd48d44580b50/meld3-1 .0.1. tar .gz #md5=2f045abe0ae108e3c8343172cffbe21d
tar  -xf meld3-1.0.1. tar .gz
cd  meld3-1.0.1
python setup.py  install
wget https: //pypi .python.org /packages/12/50/cd330d1a0daffbbe54803cb0c4c1ada892b5d66db08befac385122858eee/supervisor-3 .1.4. tar .gz #md5=cb64f92409ebabf17aa0884fc407fec6
tar  -zxvf supervisor-3.1.4. tar .gz
cd  supervisor-3.1.4
python setup.py  install
echo_supervisord_conf> /etc/supervisord .conf

2.配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
配置文件1
cat  /etc/supervisord .conf | grep  - v  ";" | grep  - v  "^$"
[unix_http_server]
[supervisord]
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
[include]
files =  /etc/supervisord .d/*.ini
配置文件2
cat  /etc/supervisord .d /block_push .ini
[program:block_push]
#process_name=%(program_name)s_%(process_num)02d
command = /usr/bin/php7  /web/info/block .com /artisan  queue:work -- sleep =3 --tries=3 --daemon
autostart= true
autorestart=unexpected
user=www
numprocs=1
redirect_stderr= true
startsecs=10
stdout_logfile= /var/log/supervisor/supervisord .d /block_push .log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile= /var/log/supervisor/supervisord .d /block_push .log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB

3启动脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cat  /etc/init .d /supervisord
#!/bin/bash
#
# supervisord   This scripts turns supervisord on
#
# Author:       Mike McGrath <mmcgrath@redhat.com> (based off yumupdatesd)
#
# chkconfig:    - 95 04
#
# description:  supervisor is a process control utility.  It has a web based
#               xmlrpc interface as well as a few other nifty features.
# processname:  supervisord
# config: /etc/supervisord.conf
# pidfile: /var/run/supervisord.pid
#
# source function library
/etc/rc .d /init .d /functions
RETVAL=0
start() {
echo  -n $ "Starting supervisord: "
daemon supervisord
RETVAL=$?
echo
[ $RETVAL - eq  0 ] &&  touch  /var/lock/subsys/supervisord
}
stop() {
echo  -n $ "Stopping supervisord: "
killproc supervisord
echo
[ $RETVAL - eq  0 ] &&  rm  -f  /var/lock/subsys/supervisord
}
restart() {
stop
start
}
case  "$1"  in
start)
start
;;
stop)
stop
;;
restart|force-reload|reload)
restart
;;
condrestart)
[ -f  /var/lock/subsys/supervisord  ] && restart
;;
status)
status supervisord
RETVAL=$?
;;
*)
echo  $ "Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
exit  1
esac
exit  $RETVAL



本文转自 yawei555 51CTO博客,原文链接:http://blog.51cto.com/huwei555/1977695,如需转载请自行联系原作者
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值