乐趣区

关于kafka:躬行系列Kafka-eagle部署

版本抉择

v2.0.6

下载地址

https://codeload.github.com/s…

部署细节

因为 kafka-eagle 用的是 jmx 拉取数据,所以须要批改 kafka 启动脚本。
vim kafka-server-start.sh

 28 if ["x$KAFKA_HEAP_OPTS" = "x"]; then
 29     export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
 30 fi

改为

 28 if ["x$KAFKA_HEAP_OPTS" = "x"]; then
 29     export KAFKA_HEAP_OPTS="-server -Xms2G -Xmx2G -XX:PermSize=128m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=8 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70"
 30     export JMX_PORT="9999"
 31     #export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
 32 fi

解压,kafka-eagle 是嵌套的压缩。须要解压两次能力失去真正的安装包。

tar -zxvf kafka-eagle-bin-2.0.6.tar.gz
cd kafka-eagle-bin-2.0.6
tar -zxvf kafka-eagle-web-2.0.6-bin.tar.gz

kafka-eagle 必须配置环境变量。

vim /etc/profile

export KE_HOME=/usr/local/kafka-eagle-web-2.0.6
export PATH=$PATH:$KE_HOME/bin

批改配置文件:system-config.properties
个别须要批改的配置项都在上面了。

######################################
# multi zookeeper & kafka cluster list
######################################
kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=192.168.1.73:2181,192.168.1.52:2181,192.168.1.102:2181

######################################
# kafka offset storage
######################################
cluster1.kafka.eagle.offset.storage=kafka

######################################
# kafka mysql jdbc driver address
######################################
kafka.eagle.driver=com.mysql.cj.jdbc.Driver
kafka.eagle.url=jdbc:mysql://127.0.0.1:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
kafka.eagle.username=root
kafka.eagle.password=123456

留神启动日志里的用户名明码

常用命令

启动:ke start
进行:ke stop
查看状态:ke status

退出移动版