centos下supervisor安装和使用

安装

dnf update -y
dnf install supervisor
sytemctl enable supervisord

配置

vim /etc/supervisor/xxx.conf

    [program:testprogram]
    directory = /root/go/src/test
    command = /root/go/src/test/bin/server
    autostart = true
    startsecs = 5
    autorestart = true
    startretries = 3
    user = root
    redirect_stderr = true
    stdout_logfile = /var/log/supervisor/test.log

使用

supervisorctl reload
supervisorctl start xxx
supervisorctl status

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

*

code