Ubuntu16.04安装Supervisor

安装

sudo apt-get install supervisor 

启动,否则会报 unix:///tmp/supervisor.sock no such file

service supervisor start
supervisord -c /etc/supervisord.conf

查看状态

supervisorctl status #查看supervisorctl状态
supervisorctl start openfalcon #启动子进程
supervisorctl stop openfalcon  #关闭子进程
supervisorctl restart openfalcon #重启子进程

比如

lintong@master:~$ supervisorctl status
openfalcon                       RUNNING   pid 10759, uptime 0:18:46

配置文件在 /etc/supervisor 目录下

lintong@master:/etc/supervisor$ ls
conf.d  start_openfalcon.conf  supervisord.conf

内容

[program:openfalcon]
command = cd ~/software/open-falcon-v0.2.1 & open-falcon start
user = lintong
autostart = true
autoresart = true
stderr_logfile = /var/log/supervisor/openfalcon.stderr.log
stdout_logfile = /var/log/supervisor/openfalcon.stdout.log

重新加载配置

supervisorctl reload

更新配置

supervisorctl update

web界面,账号密码参考 /etc/supervisord.conf

localhost:9001

扫描二维码关注公众号,回复: 7225478 查看本文章

猜你喜欢

转载自www.cnblogs.com/tonglin0325/p/11483918.html