码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu16.04部署supervisor

时间:2020-04-05 00:18:04      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:zookeeper   自启动   logfile   开机自启动   java_home   添加   jdk   systemctl   网页   

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

Ubuntu16.04部署supervisor

标签:zookeeper   自启动   logfile   开机自启动   java_home   添加   jdk   systemctl   网页   

原文地址:https://blog.51cto.com/mfl0801/2484917

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!