1.安裝(Centos7):
# yum install python-setuptools
# easy_install supervisor
如果easy_install不好使就從官方下載:
然后通過python安裝:
# tar zxf supervisor-3.1.3.tar.gz
# cd supervisor
# python setup.py install
2.成功安裝后可以登陸python控制臺輸入import supervisor 查看是否能成功加載寞钥。
3.生成配置文件(supervisord.conf):
echo_supervisord_conf > /etc/supervisord.conf
修改配置文件:
在supervisord.conf最后增加(設(shè)置訪問端口號,用戶和密碼):
[inet_http_server]
port = :9001
username=admin
password=admin
[include]
files = supervisord.d/*.ini
4.建立配置文件存放目錄:
mkdir /etc/supervisord.d
5.運(yùn)行命令:
supervisord -c /etc/supervisord.conf? //啟動supervisor
supervisorctl //打開命令行