centos6.8安装superctl 后台管理工具

下载安装python

yum install python-setuptools

从官网下载supervisor包

https://pypi.python.org/pypi/supervisor

解压
tar zxf supervisor-3.1.3.tar.gz

 cd supervisor

编译

python setup.py install

/usr/bin/echo_supervisord_conf > /etc/supervisord.conf

将命令改为superctl

Vim /home/xiaohe/superctl 
#!/bin/bash
 /usr/bin/python /usr/bin/supervisorctl -c /etc/supervisord.conf $1 $2

修改配置文件,加入nginx

Vim /etc/supervisord.conf
[program:nginx]
command=/home/xiaohe/nginx/sbin/nginx -c /home/xiaohe/nginx/conf/nginx.conf
diretory=/home/xiaohe/nginx
user=root

启动

/usr/bin/supervisord -c /etc/supervisord.conf 

加载

/home/xiaohe/superctl update

查看状态

/home/xiaohe/superctl status
posted @ 2017-01-11 18:48  boy215  阅读(864)  评论(0编辑  收藏  举报