zoukankan      html  css  js  c++  java
  • centos7安装supervisor

    
    安装supervisor 
    
    cd /root/tools/
    wget http://pnxcvm0bq.bkt.clouddn.com/get-pip.py
    
    python get-pip.py
    
    pip install supervisor
    
    mkdir  /home/heron/supervisor && cd /home/heron/supervisor && mkdir bin conf log
    
    cp  /usr/bin/supervisor*  /home/heron/supervisor/bin/
    
    echo_supervisord_conf > /home/heron/supervisor/conf/supervisord.conf
    
    sed -i "/chown/achown=heron:heron         ; socket file uid:gid owner" /home/heron/supervisor/conf/supervisord.conf
    
    sed  -i  "s/tmp/home/heron/supervisor/g" /home/heron/supervisor/conf/supervisord.conf
    
    echo "python /home/heron/supervisor/bin/supervisorctl -c /home/heron/supervisor/conf/supervisord.conf $1 $2" > /home/heron/superctl
    
    chmod +x /home/heron/superctl
    
    python /home/heron/supervisor/bin/supervisord -c /home/heron/supervisor/conf/supervisord.conf
    
    chown -R heron.heron /home/heron
    
    
    ##设置开机启动
    cat >> /lib/systemd/system/supervisord.service << EOF
    [Unit]
    Description=Process Monitoring and Control Daemon
    After=rc-local.service
    
    [Service]
    Type=forking
    ExecStart=/usr/bin/python /home/heron/supervisor/bin/supervisord -c /home/heron/supervisor/conf/supervisord.conf
    SysVStartPriority=99
    
    [Install]
    WantedBy=multi-user.target
    EOF
    
    chmod +x /lib/systemd/system/supervisord.service
    systemctl enable supervisord
    
    
    赵客缦胡缨,吴钩霜雪明。 银鞍照白马,飒沓如流星。
  • 相关阅读:
    指针
    初级程序员面试不靠谱指南(七)
    初级程序员面试不靠谱指南(六)
    Hadoop 中利用 mapreduce 读写 mysql 数据
    Mapreduce的文件和hbase共同输入
    mapreduce多文件输出的两方法
    mapreduce中一个map多个输入路径
    GDB介绍
    超强的指针学习笔记
    iOS开发之Appstore篇——版本更新
  • 原文地址:https://www.cnblogs.com/boy215/p/10488680.html
Copyright © 2011-2022 走看看