CentOS6 install Supervisor3

2018-12-12 18:06:52
  1. install python-pip

    1
    2
    3
    4
    if exit epel, already install, first remove supervisor
    yum remove supervisor

    yum -y install python-pip
  2. install supervisor

    1
    2
    3
    4
    5
    6
    pip install supervisor

    # supervisord -v
    3.3.4

    pip install meld3==1.0.0
  3. config supervisor

    1
    2
    3
    4
    5
    6
    7
    echo_supervisord_conf > /etc/supervisord.conf

    mkdir /etc/supervisor/conf.d

    /etc/supervisord.conf append below:
    [include]
    files = /etc/supervisor/conf.d/*.conf
  4. Supervisor manage program, /etc/supervisor/conf.d/xxxx.conf

    1
    2
    3
    4
    5
    6
    [program:appname]
    command=/usr/local/redis/bin/redis-server /etc/redis.conf
    autostart=true
    autorestart=true
    user=redis
    redirect_stderr=true
  5. add system service

    1
    2
    3
    4
    5
    curl -o /etc/rc.d/init.d/supervisord https://raw.githubusercontent.com/Supervisor/initscripts/master/redhat-init-equeffelec
    chmod 755 /etc/rc.d/init.d/supervisord
    chkconfig --add supervisord
    service supervisord start
    pkill supervisord

ref
redhat-init-equeffelec