zoukankan      html  css  js  c++  java
  • nginx通过Supervisor实现守护进程

    • 部署supervisor服务

      # easy_install的方式
      yum install -y python-setuptools
      easy_install supervisor
      echo_supervisord_conf >/etc/supervisord.conf
      
    • 配置supervisord.conf

      # 修改supervisord.conf行尾
      
      [include]
      files = /etc/supervisor/*.conf
      
      # web界面显示
      [inet_http_server]
      port=IP:9001
      
      # 启动
      supervisord -c supervisord.conf
      
      # 创建目录
      mkdir -p /etc/supervisor
      
      
    • 配置nginx.conf文件

      # vim /etc/supervisor/nginx.conf
      [program: nginx]
      command=/data/nginx/sbin/nginx  -g 'daemon off;'  # 修改自己的路径
      autorestart=true ;
      autostart=true ;
      stderr_logfile=/var/log/error.log ;
      stdout_logfile=/var/log/stdout.log ;
      environment=ASPNETCORE_ENVIRONMENT=Production ;
      user=root ;
      stopsignal=INT
      startsecs=10 ;
      startretries=5 ;
      stopasgroup=true
      
      # 重新加载
      supervisorctl -c supervisord.conf reload
      
      # 使用supervisorctl启动nginx服务
      supervisorctl start nginx
      
      #查看状态
      supervisorctl status
      
  • 相关阅读:
    Oozie — What Why and How
    git 用户手册
    整理笔记 C语言
    第一次理解通用链表
    C++ 通用队列类
    懂了这些,你才真正懂了C
    简单键盘驱动
    简述进程间通信方式
    几何原本
    GSP几何画板简介
  • 原文地址:https://www.cnblogs.com/only-me/p/12217675.html
Copyright © 2011-2022 走看看