KAFKA-MANAGER安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了KAFKA-MANAGER安装相关的知识,希望对你有一定的参考价值。
参考文档:https://github.com/yahoo/kafka-manager
一、下载源码
下载链接: https://github.com/yahoo/kafka-manager/releases
下载源码到/opt目录
ls /opt kafka-manager-master
二、修改配置文件
cd /opt/kafka-manager-master/conf/ vim application.conf #修改下面的配置为zookeeper集群地址 kafka-manager.zkhosts="172.16.2.27:2181,172.16.2.28:2181,172.16.2.29:2181"
三、构建
./sbt clean dist # ll total 76 drwxr-xr-x 9 root root 4096 Dec 2 02:11 app -rw-r--r-- 1 root root 3133 Dec 2 02:11 build.sbt drwxr-xr-x 2 root root 4096 Dec 8 13:36 conf drwxr-xr-x 2 root root 4096 Dec 2 02:11 img -rw-r--r-- 1 root root 11307 Dec 2 02:11 LICENCE drwxr-xr-x 4 root root 4096 Dec 8 11:46 project drwxr-xr-x 5 root root 4096 Dec 2 02:11 public -rw-r--r-- 1 root root 6658 Dec 2 02:11 README.md -rwxr-xr-x 1 root root 19460 Dec 2 02:11 sbt drwxr-xr-x 4 root root 4096 Dec 2 02:11 src drwxr-xr-x 7 root root 4096 Dec 8 12:48 target drwxr-xr-x 4 root root 4096 Dec 2 02:11 test cp /opt/kafka-manager-master/target/universal/kafka-manager-1.3.3.15.zip /opt tar zxf kafka-manager-1.3.3.15.zip
构建完成后生成一个target目录,将该目录下的universal/kafka-manager-1.3.3.15.zip 压缩包拷贝到/opt
启动kafka-manager
bin/kafka-manager -Dconfig.file=/path/to/application.conf -Dhttp.port=8080
访问kafka-manager,创建一个cluster即可。Cluster Name和Cluster Zookeeper Hosts配置下即可,其他配置可以保持默认
JMX配置需要修改kafka启动脚本,设置JMX_PORT="9999"
vim /usr/local/kafka/bin/kafka-server-start.sh if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then export KAFKA_HEAP_OPTS="-Xmx2G -Xms2G" export JMX_PORT="9999" fi
以上是关于KAFKA-MANAGER安装的主要内容,如果未能解决你的问题,请参考以下文章