zoukankan      html  css  js  c++  java
  • centos 7 通过supervisor托管服务

    1、安装supervisor

    yum install -y supervisor

    2、安装完之后默认加载其他配置文件的目录为

    # tail /etc/supervisord.conf
    ;priority=999                  ; the relative start priority (default 999)
    
    ; The [include] section can just contain the "files" setting.  This
    ; setting can list multiple files (separated by whitespace or
    ; newlines).  It can also contain wildcards.  The filenames are
    ; interpreted as relative to this file.  Included files *cannot*
    ; include files themselves.
    
    [include]
    files = supervisord.d/*.ini

    3、配置服务

    vim /etc/supervisord.d/myservice.ini
    command     = /bin/t.sh
    directory   = /tmp
    user        = test
    startsecs   = 3
    
    redirect_stderr         = true
    stdout_logfile_maxbytes = 50MB
    stdout_logfile_backups  = 10
    stdout_logfile          = /var/log/test.log

    4、启动supervisord服务

    supervisord -c /etc/supervisord.conf 

    5、通过supervisorctl操作服务

    # supervisorctl
    myservice                  RUNNING   pid 53913, uptime 0:00:49
  • 相关阅读:
    FTP Protocol
    File Operations
    Ubuntu Install Chinese Input Method
    Vim Intro
    ISA Introduction
    Fourier Transform
    Process/Thread Synchronization
    Process Synchronization-Example 2
    leetcode 栈和队列类型题
    leetcode 字符串类型题
  • 原文地址:https://www.cnblogs.com/Bccd/p/13567236.html
Copyright © 2011-2022 走看看