Ubuntu16.04部署supervisor

痴心易碎 提交于 2020-04-06 07:37:35

Ubuntu16.04部署supervisor

安装supervisor:

apt-get install -y supervisor

启动supervisor:

systemctl start supervisor

设置开机自启动:

systemctl enable supervisor

编辑配置文件:

实例:

supervisor 配置文件

编辑配置文件:

vim /etc/supervisor/supervisord.conf

添加:(开启supervisor网页功能)

[inet_http_server]

port=0.0.0.0:9001

username=user

password=123

添加进程配置文件

cd /etc/supervisor/conf.d/

zookeeper为例:

vim zk.conf

---------------------------------------------------------

[program:zk]

command = /usr/zookeeper-3.4.10/bin/zkServer.sh start-foreground

environmen=JAVA_HOME="/usr/jdk1.8"

user = root

autostart = true

autorestart = true

startsecs = 5

redirect_stderr = true

stopasgroup = true

ikillasgroup = true

stdout_logfile_maxbytes = 50MB

stdout_logfile_backups = 10

stdout_logfile = /var/log/supervisor/zk.log

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!