kafka-eagle安裝

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/

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章