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
赵客缦胡缨,吴钩霜雪明。 银鞍照白马,飒沓如流星。
原文地址:https://www.cnblogs.com/boy215/p/6274771.html