1 安装jdk
2 下载kafka-eagle
cd /usr/local
wget https://github.com/smartloli/kafka-eagle-bin/archive/v3.0.1.tar.gz
3 解压安装
cd /usr/local
tar -zvxf v3.0.1.tar.gz
cd kafka-eagle-bin-3.0.1/
tar -zxvf kafka-eagle-web-3.0.1-bin.tar.gz
cd ../
mv kafka-eagle-web-3.0.1 kafka-eagle
4 mysql中创建 ke数据库
5 设置环境变量
vim /etc/profile
export KE_HOME=/opt/bd/kafka-eagle
export PATH=$PATH:$KE_HOME/bin
source /etc/profile
6 修改配置7
cd ${KE_HOME}/conf
vim system-config.properties
kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=内网ip1:2181,内网ip2:2181,内网ip3:2181
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
#Mysql密码
kafka.eagle.username=root
kafka.eagle.password=123456
7 开启JMX vim bin/kafka-server-start.sh中修改为
...
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-server -Xms2G -Xmx2G -XX:PermSize=128m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=8 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70"
export JMX_PORT="9999"
fi
8 如果Kafka开启了安全认证如则需要修改sasl设置
cluster1.efak.sasl.enable=true
cluster1.efak.sasl.protocol=SASL_PLAINTEXT
cluster1.efak.sasl.mechanism=PLAIN
cluster1.efak.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="admin" password="admin";
cluster1.efak.sasl.client.id=
cluster1.efak.blacklist.topics=
cluster1.efak.sasl.cgroup.enable=false
cluster1.efak.sasl.cgroup.topics=
9 $KE_HOME/bin/ke.sh start 启动 并开启8048端口
10 测试http://ip:8048/,用户名 admin 密码 123456