安装supervisor

安装supervisor

 

有网安装,两种方法

第一种、用easy_install,是setuptools的功能。这是安装的首选方法。

第二种、下载包和调用命令

 

介绍第一种,有网且用Setuptools

如果Setuptools已经安装,且有网。安装只需要用一步:easy_install

easy_install supervisor

根据你系统Python的权限,需要用root 起easy_install命令来成功安装Supervisor。

介绍第二种,有网但没有Setuptools

如果你的系统没有Setuptools。

1、你需要下载Supervisor并且手动安装。从https://pypi.python.org/pypi/supervisor 下载。

2、解压后,到setup.py路径下,调用 python setup.py install命令。 这需要网。它会根据 Supervisor下载安装所有的distributions,才能成功安装。

注意这里可能会报错。 在/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

Running Supervisor

/usr/bin/python /usr/bin/supervisord -c /usr/local/supervisord.conf

 

 

以下摘自官网

http://supervisord.org/installing.html

 

Installing

Installation instructions depend whether the system on which you’re attempting to install Supervisor has internet access.

Installing to A System With Internet Access

If your system has internet access, you can get Supervisor installed in two ways:

  • Using easy_install, which is a feature of setuptools. This is the preferred method of installation.
  • By downloading the Supervisor package and invoking a command.

Internet-Installing With Setuptools

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.

Internet-Installing Without Setuptools

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.

 

Creating a Configuration File

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.

posted @ 2017-05-09 14:54  zongzongzong  阅读(399)  评论(0编辑  收藏  举报