yum install python-setuptools
https://pypi.python.org/pypi/supervisor
cd supervisor
python setup.py install
/usr/bin/echo_supervisord_conf > /etc/supervisord.conf
Vim /home/xiaohe/superctl
#!/bin/bash
/usr/bin/python /usr/bin/supervisorctl -c /etc/supervisord.conf $1 $2
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