安装supervisorhtml
第一种、用easy_install,是setuptools的功能。这是安装的首选方法。python
第二种、下载包和调用命令web
介绍第一种,有网且用Setuptoolsbash
若是Setuptools已经安装,且有网。安装只须要用一步:easy_installui
easy_install supervisor
根据你系统Python的权限,须要用root 起easy_install命令来成功安装Supervisor。this
介绍第二种,有网但没有Setuptoolsspa
若是你的系统没有Setuptools。code
一、你须要下载Supervisor而且手动安装。从https://pypi.python.org/pypi/supervisor 下载。orm
二、解压后,到setup.py路径下,调用 python setup.py install
命令。 这须要网。它会根据 Supervisor下载安装全部的distributions,才能成功安装。htm
注意这里可能会报错。 在/usr/lib/python2.6/site-packages下meld3相关包下载不下来。这里提供一个tar包,里面的依赖包都是全的。直接解压到/usr/lib/python2.6/下。 连接:http://pan.baidu.com/s/1c2F0vyo 密码:vv5a
一旦Supervisor安装完成。调用 echo_supervisord_conf
命令。会在终端显示配置文件的示例。
一旦看到终端的示例,使用 echo_supervisord_conf > /etc/supervisord.conf
。若是放在/etc下没有root权限不行。
若是你没有root权限,那么就别放在 /etc/supervisord.conf 路径下了,放在当前路径吧。start supervisord的时候使用 -c
选项指定文件位置。
配置信息: http://www.supervisord.org/configuration.html#programx-section
/usr/bin/python /usr/bin/supervisord -c /usr/local/supervisord.conf
如下摘自官网
http://supervisord.org/installing.html
Installation instructions depend whether the system on which you’re attempting to install Supervisor has internet access.
If your system has internet access, you can get Supervisor installed in two ways:
If the Python interpreter you’re using has Setuptools installed, and the system has internet access, you can download and install supervisor in one step using easy_install.
easy_install supervisor
Depending on the permissions of your system’s Python, you might need to be the root user to install Supervisor successfully using easy_install.
If your system does not have setuptools installed, you will need to download the Supervisor distribution and install it by hand. Current and previous Supervisor releases may be downloaded from PyPi. After unpacking the software archive, run python setup.py install. This requires internet access. It will download and install all distributions depended upon by Supervisor and finally install Supervisor itself.
Note
Depending on the permissions of your system’s Python, you might need to be the root user to successfully invoke python setup.py install.
Once the Supervisor installation has completed, run echo_supervisord_conf. This will print a “sample” Supervisor configuration file to your terminal’s stdout.
Once you see the file echoed to your terminal, reinvoke the command as echo_supervisord_conf > /etc/supervisord.conf. This won’t work if you do not have root access.
If you don’t have root access, or you’d rather not put the supervisord.conf file in /etc/supervisord.conf`, you can place it in the current directory (echo_supervisord_conf > supervisord.conf) and start supervisord with the -c flag in order to specify the configuration file location.
For example, supervisord -c supervisord.conf. Using the -c flag actually is redundant in this case, because supervisord searches the current directory for a supervisord.conf before it searches any other locations for the file, but it will work. See Running Supervisor for more information about the -c flag.
Once you have a configuration file on your filesystem, you can begin modifying it to your liking.