#安装 supervisor
yum install supervisor
#查看安装信息
yum info supervisor
Loaded plugins: security
Installed Packages
Name : supervisor
Arch : noarch
Version : 2.1
Release : 9.el6
Size : 1.1 M
Repo : installed
From repo : epel
Summary : A System for Allowing the Control of Process State on UNIX
URL : http://www.plope.com/software/supervisor2/
License : ZPLv2.1 and BSD and MIT
Description : The supervisor is a client/server system that allows its users to control a
: number of processes on UNIX-like operating systems.
[program:awesome]
command = /srv/awesome/www/app.py
directory = /srv/awesome/www
user = root
startsecs = 3
redirect_stderr = true
stdout_logfile_maxbytes = 50MB
stdout_logfile_backups = 10
stdout_logfile = /srv/awesome/log/app.log
在使用输入supervisorctl reload 或者 supervisorctl 前,必须先用service supervisord start 命令启动服务,否则会提示下面错误:
[root@localhost etc]# supervisorctl reload
error: , [Errno 2] No such file or directory: file: line: 1
[root@localhsot etc]# supervisorctl
error: , [Errno 2] No such file or directory: file: line: 1
[root@localhsot etc]# service supervisord start
Starting supervisord: [ OK ]
[root@localhost etc]# supervisorctl
awesome RUNNING pid 28877, uptime 0:00:38