supervisor安装启动:
apt-get install supervisor -y# start supervisord nodaemon/usr/bin/supervisord --nodaemon
nginx示例:
[program:nginx]command = /usr/sbin/nginx -g 'daemon off;'process_name = %(program_name)sstopsignal = QUITautostart = true# startsecs = 30# startretries = 3autorestart = true# exitcodes = 0,1,2stdout_logfile_maxbytes = 10MBstdout_logfile_backups = 5stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log# stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.logredirect_stderr = true
ntpd示例:
[program:ntpd]command = /usr/sbin/ntpd -dprocess_name = %(program_name)sstopsignal = QUITautostart = true# startsecs = 30# startretries = 3autorestart = true# exitcodes = 0,1,2stdout_logfile_maxbytes = 10MBstdout_logfile_backups = 5stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log# stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.logredirect_stderr = true
uwsgi示例:
[program:uwsgi]command = uwsgi ${APP_PATH}/server-config/uwsgi/uwsgi.iniprocess_name = %(program_name)sstopsignal = QUITautostart = true# startsecs = 30# startretries = 3autorestart = true# exitcodes = 0,1,2stdout_logfile_maxbytes = 10MBstdout_logfile_backups = 5stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log# stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.logredirect_stderr = true
参考资料:
supervisor 进程控制服务:
用supervisor管理nginx+uwsgi部署django项目:
nginx and supervisor setup in Ubuntu:
Nginx with Supervisor keep changing status b/w Running and Starting:
virtualenv 环境下 Django + Nginx + Gunicorn+ Supervisor 搭建 Python Web:
Dockerfile示例:
supervisor配置文件示例:
Docker官方示例:
Ubuntu14.04+Nginx+Uwsgi+Supervisor部署Django Web App:
supervisor工具使用:
supervisor安装配置与使用:
[supervisor] 使用小记(入门教程),supervisor小记:
Linux下进程管理工具Supervisor的安装配置和基本使用:
Supervisor重新加载配置启动新的进程:
Linux的NTP配置总结:
:
uwsgi配置参数详解:
MORE:
Supervisor 管理后台守护进程:
Supervisor的安装与使用入门:
Configuration File:
使用 supervisor 管理进程(配置文件解释):