1、首先去官网下载eagle
http://download.kafka-eagle.org/
2、上传至服务器,解压到安装目录,我使用的是1.4.4版本
tar -xzf kafka-eagle-bin-1.4.4.tar.gz -C /apps/
cd /apps
mv kafka-eagle-bin-1.4.4 eagle
3、修改/etc/bashrc,添加下面环境变量
export KE_HOME=/apps/eagle
export PATH=$KE_HOME/bin:$PATH
4、修改/apps/eagle/conf/system-config.properties配置文件
######################################
# multi zookeeper & kafka cluster list
######################################
kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=m.hadoop.com:2181,s1.hadoop.com:2181,s2.hadoop.com:2181
######################################
# broker size online list
######################################
cluster1.kafka.eagle.broker.size=20
######################################
# zk client thread limit
######################################
kafka.zk.limit.size=25
######################################
# kafka eagle webui port
######################################
kafka.eagle.webui.port=8048
######################################
# kafka offset storage
######################################
cluster1.kafka.eagle.offset.storage=kafka
######################################
# kafka metrics, 30 days by default
######################################
kafka.eagle.metrics.charts=true
kafka.eagle.metrics.retain=30
######################################
# kafka sql topic records max
######################################
kafka.eagle.sql.topic.records.max=5000
kafka.eagle.sql.fix.error=false
######################################
# delete kafka topic token
######################################
kafka.eagle.topic.token=keadmin
######################################
# kafka sasl authenticate
######################################
# cluster1.kafka.eagle.sasl.enable=false
# cluster1.kafka.eagle.sasl.protocol=SASL_PLAINTEXT
# cluster1.kafka.eagle.sasl.mechanism=SCRAM-SHA-256
# cluster1.kafka.eagle.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="kafka" password="kafka-eagle";
# cluster1.kafka.eagle.sasl.client.id=
# cluster1.kafka.eagle.sasl.cgroup.enable=false
# cluster1.kafka.eagle.sasl.cgroup.topics=
# cluster2.kafka.eagle.sasl.enable=false
# cluster2.kafka.eagle.sasl.protocol=SASL_PLAINTEXT
# cluster2.kafka.eagle.sasl.mechanism=PLAIN
# cluster2.kafka.eagle.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="kafka" password="kafka-eagle";
# cluster2.kafka.eagle.sasl.client.id=
# cluster2.kafka.eagle.sasl.cgroup.enable=false
# cluster2.kafka.eagle.sasl.cgroup.topics=
######################################
# kafka sqlite jdbc driver address
######################################
# kafka.eagle.driver=org.sqlite.JDBC
# kafka.eagle.url=jdbc:sqlite:/hadoop/kafka-eagle/db/ke.db
# kafka.eagle.username=root
# kafka.eagle.password=www.kafka-eagle.org
######################################
# kafka mysql jdbc driver address
######################################
kafka.eagle.driver=com.mysql.jdbc.Driver
kafka.eagle.url=jdbc:mysql://five.mysql.com:3306/ke?useSSL=false
kafka.eagle.username=root
kafka.eagle.password=123456
5、安装eagle需要先安装MySQL,我此次使用mysql8.0报错,换回了5.7.26版本,可以正常使用
6、启动之前,在MySQL中新建ke数据库:
create database ke;
7、找到kafka安装目录,在bin/kafka-server-start.sh中修改如下内容:
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
export JMX_PORT="9999"
fi
8、将eagle目录下的bin/ke.sh添加可执行权限
chmod 755 /apps/eagle/bin/ke.sh
9、启动eagle
/apps/eagle/bin/ke.sh start
[2020-02-24 18:23:11] INFO: Status Code[0]
[2020-02-24 18:23:11] INFO: [Job done!]
Welcome to
__ __ ___ ____ __ __ ___ ______ ___ ______ __ ______
/ //_/ / | / __/ / //_/ / | / ____/ / | / ____/ / / / ____/
/ ,< / /| | / /_ / ,< / /| | / __/ / /| | / / __ / / / __/
/ /| | / ___ | / __/ / /| | / ___ | / /___ / ___ |/ /_/ / / /___ / /___
/_/ |_| /_/ |_|/_/ /_/ |_| /_/ |_| /_____/ /_/ |_|\____/ /_____//_____/
Version 1.4.4
*******************************************************************
* Kafka Eagle Service has started success.
* Welcome, Now you can visit 'http://192.168.10.11:8048/ke'
* Account:admin ,Password:123456
*******************************************************************
* <Usage> ke.sh [start|status|stop|restart|stats] </Usage>
* <Usage> https://www.kafka-eagle.org/ </Usage>
*******************************************************************
10、通过用户名密码Account:admin ,Password:123456登录网址http://m.hadoop.com:8048/ke/。