生产环境部署Supervisor与Tornado

1、安装supervisor

easy_install supervisor

2、配置supervisor

echo_supervisord_conf > /etc/supervisord.conf
vim /etc/supervisord.conf
[program:jfweb]
command=python /home/www/server/web.py -port=81%(process_num)02d
process_name=%(program_name)s_%(process_num)02d
autostart=true
autorestart=true
numprocs=16
numprocs_start=1
[program:jfweb_admin]
command=python /home/www/server/admin_web.py
process_name=%(program_name)s
autostart=true
阅读全部