重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
本篇文章为大家展示了RHEL6.5怎样安装supervisor-3.3.1-py2.6.egg,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
创新互联公司专注于昌图网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供昌图营销型网站建设,昌图网站制作、昌图网页设计、昌图网站官网定制、小程序开发服务,打造昌图网络公司原创品牌,更为您提供昌图网站排名全网营销落地服务。
1、RHEL6.5的python版本:
[root@DMS supervisor]# python
Python 2.6.6 (r266:84292, Sep 4 2013, 07:46:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
2、安装supervisor-3.3.1-py2.6.egg时报错:提示
Installed /usr/lib/python2.6/site-packages/supervisor-3.3.1-py2.6.egg
Processing dependencies for supervisor==3.3.1
Searching for meld3>=0.6.5
Reading https://pypi.python.org/simple/meld3/
Download error on https://pypi.python.org/simple/meld3/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'meld3' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for meld3>=0.6.5
error: Could not find suitable distribution for Requirement.parse('meld3>=0.6.5')
3、从 https://pypi.python.org/simple/meld3下载meld3-0.6.7.tar.gz,解压python setup.py install安装。
4、下载安装setuptools-36.0.1.zip
5、下载安装supervisor-3.3.1.tar.gz
6、配置文件:
1)创建/etc/supervisor/conf.d文件夹
2)supervisord.conf放置于/etc/supervisor/下,其中
[include]
files = /etc/supervisor/conf.d/*.conf
3)所以将待监控进程以.conf结尾的配置文件放置在/etc/supervisor/conf.d/目录下。
7、supervisord.conf中
[supervisorctl]
serverurl = http://localhost:9001
username = root
password = 123456
prompt = mysupervisor
用户名密码设置不对的话,执行supervisorctl update报错:“Error:Server requires authentication”
8、/etc/supervisor/conf.d/目录下的配置文件例如adcc.conf[program:sendVer2Com1]
command = sudo xterm -e python sendVer2Com1.py ttyS1
//对于字符终端程序,要想启动独立的xterm显示程序运行内容,需要使用“ xterm -e”
numprocs = 1
process_name=%(program_name)s-%(process_num)s
user = adcc
environment= HOME=/home/adcc
//设置程序运行时需要的环境变量,如这里:家目录
autorestart=true
redirect_stderr = true
stopasgroup=true
killasgroup=true
directory = /home/adcc/monitor
stdout_logfile = /etc/supervisor/%(program_name)s.log
directory = /home/adcc/monitor/bin/
//设置运行进程所在的目录,这样该进程使用相对路径找配置文件不会找不到。如:../resource/xxx.ini
上述内容就是RHEL6.5怎样安装supervisor-3.3.1-py2.6.egg,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联行业资讯频道。