supersord install

  1. 安装

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    [root@plat1 srv]# wget https://bootstrap.pypa.io/ez_setup.py -O - | python
    [root@plat1 srv]# easy_install supervisor

    or:
    [root@plat1 srv]# pip install supervisor
    [root@plat1 srv]# echo_supervisord_conf |tee /etc/supervisord.conf
    [root@plat1 srv]# cat >> /etc/supervisord.conf <<EOF
    [program:hello]
    command=python /mnt/web/tornado/hello.py --port=8888
    directory=/mnt/web/tornado/
    autorestart=true
    redirect_stderr=true
    EOF
    [root@dev tornado]# supervisord
  2. 使用

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    [root@plat1 srv]# cat /etc/supervisord.conf
    [program:openvpn]
    directory=/etc/openvpn
    command=/usr/local/openvpn/sbin/openvpn --config /etc/openvpn/server.conf
    process_name=%(program_name)s
    numprocs=1
    user=root
    autorstart=true
    autorestart=true
    stdout_logfile=/tmp/supervisor_openvpn.log
  3. supersord启动

    1
    2
    [root@plat1 srv]# /usr/bin/supervisord -c /etc/supervisord.conf
    [root@plat1 openvpn]# supervisorctl reload