supervisor使用
supervisor配置文件:/etc/supervisord.conf
子进程配置文件路径:/etc/supervisord.d
- supervisord
运行 Supervisor 时会启动一个进程 supervisord,它负责启动所管理的进程,并将所管理的进程作为自己的子进程来启动,而且可以在所管理的进程出现崩溃时自动重启。
1.2 查看安装是否成功
echo_supervisord_conf
node2:/root/test#echo_supervisord_conf
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
2.0 创建目录,初始化配置文件
mkdir /etc/supervisor
echo_supervisord_conf > /etc/supervisor/supervisord.conf
2.1 为了不将所有新增配置信息全写在一个配置文件里,这里新建一个文件夹
mkdir /etc/supervisor/supe