centos6安装supervisor
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos6安装supervisor相关的知识,希望对你有一定的参考价值。
参考:http://www.jianshu.com/p/2008cf9f7ee7
因为被墙,easy_install supervisor一直不成功提示:No local packages or download links found for meld3>=0.6.5
1安装
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 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启动脚本
cat /etc/init.d/supervisord #!/bin/bash # # supervisord This scripts turns supervisord on # # Author: Mike McGrath <[email protected]> (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
本文出自 “海底两万里” 博客,请务必保留此出处http://huwei555.blog.51cto.com/1347480/1977695
以上是关于centos6安装supervisor的主要内容,如果未能解决你的问题,请参考以下文章