参考:http://www.jianshu.com/p/2008cf9f7ee7
因为被墙,easy_install supervisor一直不成功提示:No local packages or download links found for meld3>=0.6.5
1安装
wgethttps://pypi.python.org/packages/0f/5e/3a57c223d8faba2c3c2d69699f7e6cfdd1e5cc31e79cdd0dd48d44580b50/meld3-1.0.1.tar.gz#md5=2f045abe0ae108e3c8343172cffbe21d tar-xfmeld3-1.0.1.tar.gz cdmeld3-1.0.1 pythonsetup.pyinstall wgethttps://pypi.python.org/packages/12/50/cd330d1a0daffbbe54803cb0c4c1ada892b5d66db08befac385122858eee/supervisor-3.1.4.tar.gz#md5=cb64f92409ebabf17aa0884fc407fec6 tar-zxvfsupervisor-3.1.4.tar.gz cdsupervisor-3.1.4 pythonsetup.pyinstall 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/artisanqueue: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 # #supervisordThisscriptsturnssupervisordon # #Author:MikeMcGrath<mmcgrath@redhat.com>(basedoffyumupdatesd) # #chkconfig:-9504 # #description:supervisorisaprocesscontrolutility.Ithasawebbased #xmlrpcinterfaceaswellasafewotherniftyfeatures. #processname:supervisord #config:/etc/supervisord.conf #pidfile:/var/run/supervisord.pid # #sourcefunctionlibrary ./etc/rc.d/init.d/functions RETVAL=0 start(){ echo-n$"Startingsupervisord:" daemonsupervisord RETVAL=$? echo [$RETVAL-eq0]&&touch/var/lock/subsys/supervisord } stop(){ echo-n$"Stoppingsupervisord:" killprocsupervisord echo [$RETVAL-eq0]&&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) statussupervisord RETVAL=$? ;; *) echo$"Usage:$0{start|stop|status|restart|reload|force-reload|condrestart}" exit1 esac exit$RETVAL原文链接:https://www.f2er.com/centos/375379.html