ubuntu安装后台进程管理利器: supervisor

  • Simon 发布于 2018-01-26
  • 栏目: linux
  • 4370人围观
  • 1评论
安装:
apt-get install supervisor


配置:


默认加载 /etc/supervisor/conf.d/ 目录下的所有.conf配置文件。

[supervisord]
nodaemon=true

# program:后面是任务名称
[program:GameAsync]
startsecs=10
redirect_stderr=true
directory=/data/wwwroot/nutspoker/
command=/usr/local/php/bin/php cli.php Game async

保存为app.conf并退出, 重启supervisor服务


管理任务
# 查看帮助
supervisorctl -h
# 开启GameAsync任务
supervisorctl start GameAsync
# 停止GameAsync任务
supervisorctl stop GameAsync
# 重启GameAsync任务
supervisorctl restart GameAsync


评论

  • test (2018-05-04 16:43:59) 说:
    34324233333333333333333333333333
  • 11 (2017-06-02 10:44:21) 说:
    11