Ubuntu16.04安装Supervisor
安装
sudo apt-get install supervisor
启动,否则会报 unix:///tmp/supervisor.sock no such file
service supervisor start
或者
supervisord -c /etc/supervisor/supervisord.conf
生成配置文件
echo_supervisord_conf > /etc/supervisor/supervisord.conf
注意里面的注释去掉
[inet_http_server] ; inet (TCP) server disabled by default
port=127.0.0.1:9001 ; (ip_address:port specifier, *:port for all iface)
username=user ; (default is no username (open server))
password=123 ; (default is no password (open server))
配置文件路径
[include]
files = /etc/supervisor/conf.d/*.conf
查看状态
supervisorctl status #查看supervisorctl状态
supervisorctl start openfalcon #启动子进程
supervisorctl stop openfalcon #关闭子进程
supervisorctl restart openfalcon #重启子进程
比如
lintong@master:~$ supervisorctl status
openfalcon RUNNING pid 10759, uptime 0:18:46
配置文件在 /etc/supervisor 目录下
lintong@master:/etc/supervisor$ ls
conf.d start_openfalcon.conf supervisord.conf
内容
[program:openfalcon]
command = cd ~/software/open-falcon-v0.2.1 & open-falcon start
user = lintong
autostart = true
autoresart = true
stderr_logfile = /var/log/supervisor/openfalcon.stderr.log
stdout_logfile = /var/log/supervisor/openfalcon.stdout.log
重新加载配置
supervisorctl reload
更新配置
supervisorctl update
web界面,账号密码参考 /etc/supervisord.conf
localhost:9001

下面是几个例子
lintong@lintong-B250M-DS3H:/etc/supervisor/conf.d$ ls
es.conf hadoop.conf hive.conf redis.conf
hadoop
[program:hadoop]
directory=/home/lintong/software/apache/hadoop-2.9.1
command = bash ./sbin/start-all.sh
user = lintong
autostart = true
autoresart = false
stderr_logfile = /var/log/supervisor/hadoop.stderr.log
stdout_logfile = /var/log/supervisor/hadoop.stdout.log
hive
[program:hive]
directory=/home/lintong/software/apache/apache-hive-2.3.3-bin
command = bash ./bin/hiveserver2 start
user = lintong
autostart = true
autoresart = true
stderr_logfile = /var/log/supervisor/hive.stderr.log
stdout_logfile = /var/log/supervisor/hive.stdout.log
es
[program:es]
directory=/home/lintong/software/apache/elasticsearch-6.2.4
command = bash ./bin/elasticsearch
user = lintong
autostart = true
autoresart = true
stderr_logfile = /var/log/supervisor/es.stderr.log
stdout_logfile = /var/log/supervisor/es.stdout.log
kafka_manager
其中的/bin/bash -c 'source "$0" && exec "$@"'是为了解决cant find command问题
[program:kafka-manager]
directory=/home/lintong/software/apache/kafka-manager-1.3.3.17/bin
command = /bin/bash -c 'source "$0" && exec "$@"' kafka-manager -Dconfig.file=/home/lintong/software/apache/kafka-manager-1.3.3.17/conf/application.conf -Dhttp.port=7778
user = lintong
autostart = true
autoresart = false
stderr_logfile = /var/log/supervisor/kafka_manager.stderr.log
stdout_logfile = /var/log/supervisor/kafka_manager.stdout.log
kibana
[program:kibana]
directory=/home/lintong/software/apache/kibana-6.2.4-linux-x86_64
command = bash ./bin/kibana
user = lintong
autostart = false
autoresart = true
stderr_logfile = /var/log/supervisor/kibana.stderr.log
stdout_logfile = /var/log/supervisor/kibana.stdout.log
zkui
[program:zkui]
directory=/home/lintong/software/zkui/target
command = java -jar zkui-2.0-SNAPSHOT-jar-with-dependencies.jar
user = lintong
autostart = false
autorestart = true
stderr_logfile = /var/log/supervisor/zkui.stderr.log
stdout_logfile = /var/log/supervisor/zkui.stdout.log
kafka-manager
[program:kafka-manager]
directory=/home/lintong/software/kafka-manager-1.3.3.17
command = bash ./bin/kafka-manager -Dconfig.file=/home/lintong/software/kafka-manager-1.3.3.17/conf/application.conf -Dhttp.port=7778
user = lintong
autostart = false
autorestart = true
stderr_logfile = /var/log/supervisor/kafka-manager.stderr.log
stdout_logfile = /var/log/supervisor/kafka-manager.stdout.log
Ubuntu16.04安装Supervisor的更多相关文章
- ubuntu16.04安装jdk,tomcat
ubuntu16.04安装jdk,tomcat 最近装了一下tomcat,网上的教程很多,我也试了很多次,但是有一些教程关于tomcat配置是错误的,让我走上了歧途.差点重装系统,还好王总及时出手帮助 ...
- Ubuntu16.04 安装openjdk-7-jdk
Ubuntu16.04 安装openjdk-7-jdk sudo apt-get install openjdk-7-jre 或者sudo apt-get install openjdk-7-jdk ...
- Ubuntu16.04安装GTK3主题:OSX-Arc
Ubuntu16.04安装GTK3主题:OSX-Arc GTK3主题:OSX-Arc描述: 前几个月,Gnome3.20升3.22的时候,出现了大量主题崩溃的现象,其中包括Arc.Flatabulou ...
- Ubuntu16.04安装opencv for python/c++
Ubuntu16.04安装opencv for python/c++ 网上关于opencv的安装已经有了不少资料,但是没有一篇资料能让我一次性安装成功,因此花费了大量时间去解决各种意外,希望这篇能给一 ...
- ubuntu16.04安装不上有道词典的解决办法
转自:http://www.linuxdiyf.com/linux/21143.html ubuntu16.04安装不上有道词典,提示: le@hu-pc:~/下载$ sudo dpkg -i you ...
- Ubuntu16.04安装mongodb
Ubuntu16.04安装mongodb copy from: http://blog.csdn.net/zhushh/article/details/52451441 1.导入软件源的公钥 sudo ...
- 【Tools】ubuntu16.04安装搜狗输入法
Ubuntu16,04 安装搜狗输入法 1.下载搜狗输入法的安装包 下载地址为:http://pinyin.sogou.com/linux/ 2.按键Ctr+Alt+T打开终端,输入以下命令切换到下载 ...
- Ubuntu16.04安装cuda9.0+cudnn7.0
Ubuntu16.04安装cuda9.0+cudnn7.0 这篇记录拖了好久,估计是去年6月份就已经安装过几遍,然后一方面因为俺比较懒,一方面后面没有经常在自己电脑上跑算法,比较少装cuda和cudn ...
- Ubuntu16.04安装TensorFlow及Mnist训练
版权声明:本文为博主原创文章,欢迎转载,并请注明出处.联系方式:460356155@qq.com TensorFlow是Google开发的开源的深度学习框架,也是当前使用最广泛的深度学习框架. 一.安 ...
随机推荐
- python 监听键盘输入
import sys, select, tty, termios old_attr = termios.tcgetattr(sys.stdin) tty.setcbreak(sys.stdin.fil ...
- 高小兰 201671010414 实验十四 团队项目评审&课程学习总结
项目 内容 软件工程 https://www.cnblogs.com/nwnu-daizh/ 作业要求 https://www.cnblogs.com/sunmiaokun/p/11095027.ht ...
- 201671010417 金振兴 实验十四 团队项目评审&课程学习总结
项目 内容 软件工程 https://www.cnblogs.com/nwnu-daizh/ 作业要求 https://www.cnblogs.com/sunmiaokun/p/11095027.ht ...
- vo bo po dao pojo dto
Recommended for you: Get network issues from WhatsUp Gold. Not end users. DAO: Data access object d ...
- python函数 | 匿名函数lambda
匿名函数:lambda 表达式.普通函数有且只有返回值的函数才能用匿名函数进行简化成一行函数. 匿名函数不单独使用,一般和内置函数结合使用.内置函数中,可加入函数的有min.max.sorted.ma ...
- Python 检查代码占用内存 工具和模块
只介绍简单的使用, 更多使用方法请查看官方文档 tracemalloc 官方文档 tracemalloc文档地址 使用 import tracemalloc tracemalloc.start() # ...
- 寄存器,移位寄存器的电路原理以及verilog代码实现
寄存器:用以存放二进制代码的电路,下图为由维特阻塞D触发器组成的4位数码寄存器: 逻辑功能分析: 1.异步端CR置0时,输出置0: 2.同步并行置数:D0~D3为4个输入代码,当CP上升沿到达时,D0 ...
- 一篇文章把你带入到JavaScript中的闭包与高级函数
在JavaScript中,函数是一等公民.JavaScript是一门面向对象的编程语言,但是同时也有很多函数式编程的特性,如Lambda表达式,闭包,高阶函数等,函数式编程时一种编程范式. funct ...
- 07-图5 Saving James Bond - Hard Version (30 分)
This time let us consider the situation in the movie "Live and Let Die" in which James Bon ...
- planning algorithms chapter 3
chapter 3 几何表示和变换 P.S: 总算到了 motion planning 部分了 几何建模 几何建模主要有两类方法:边界表示法和实体表示法. 环境模型可以是二维或三维,实体主要包括障碍物 ...