安裝supervisor

安裝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

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.

相關文章
相關標籤/搜索