温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

RHEL6.5怎样安装supervisor-3.3.1-py2.6.egg

发布时间:2021-12-04 15:01:59 来源:亿速云 阅读:265 作者:柒染 栏目:互联网科技

本篇文章为大家展示了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,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注亿速云行业资讯频道。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI