1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 17:20:55 +00:00
Beego/docs/zh/Supervisord.md

35 lines
709 B
Markdown
Raw Normal View History

2013-04-18 02:35:20 +00:00
## supervisord安装
1. setuptools安装
wget http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
2013-06-21 08:35:46 +00:00
2013-04-18 02:35:20 +00:00
sh setuptools-0.6c11-py2.7.egg
2013-06-21 08:35:46 +00:00
2013-04-18 02:35:20 +00:00
easy_install supervisor
2013-06-21 08:35:46 +00:00
2013-04-18 02:35:20 +00:00
echo_supervisord_conf >/etc/supervisord.conf
2013-06-21 08:35:46 +00:00
2013-04-18 02:35:20 +00:00
mkdir /etc/supervisord.conf.d
2013-06-21 08:35:46 +00:00
2013-04-18 02:35:20 +00:00
2. 修改配置/etc/supervisord.conf
[include]
files = /etc/supervisord.conf.d/*.conf
2013-06-21 08:35:46 +00:00
2013-04-18 02:35:20 +00:00
3. 新建管理的应用
cd /etc/supervisord.conf.d
2013-04-18 02:39:06 +00:00
vim beepkg.conf
2013-04-18 02:35:20 +00:00
配置文件:
2013-04-18 02:39:06 +00:00
[program:beepkg]
directory = /opt/app/beepkg
command = /opt/app/beepkg/beepkg
2013-04-18 02:35:20 +00:00
autostart = true
startsecs = 5
user = root
redirect_stderr = true
2013-06-21 08:35:46 +00:00
stdout_logfile = /var/log/supervisord/beepkg.log