修改 kafka 启动命令
- kafka-server-start.sh
[kevin@hadoop112 kafka-0.11.0.0]$ cd bin/
[kevin@hadoop112 bin]$ vim kafka-server-start.sh
# 将 下面的
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
fi
# 改为
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"
# export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
fi
- 分发同步
[kevin@hadoop112 bin]$ xsync.sh kafka-server-start.sh
下载安装
-
上传到 /opt/software/
-
解压
[kevin@hadoop112 software]$ tar -zxvf kafka-eagle-bin-1.4.5.tar.gz
[kevin@hadoop112 software]$ cd kafka-eagle-bin-1.4.5
[kevin@hadoop112 kafka-eagle-bin-1.4.5]$ tar -zxvf kafka-eagle-web-1.4.5.tar.gz -C /opt/module
[kevin@hadoop112 kafka-eagle-bin-1.4.5]$ mv kafka-eagle-web-1.4.5.tar.gz /opt/software/
[kevin@hadoop112 kafka-eagle-bin-1.4.5]$ cd /opt/software/
[kevin@hadoop112 software]$ rm -rf kafka-eagle-bin-1.4.5*
配置
- 配置启动文件
[kevin@hadoop112 software]$ cd /opt/module/kafka-eagle-web-1.4.5/bin
[kevin@hadoop112 bin]$ chmod 775 ke.sh
- 配置 system-config.properties
[kevin@hadoop112 bin]$ cd ../conf
[kevin@hadoop112 conf]$ vim system-config.properties
修改内容
# 修改一:这里只用到一个集群,删除cluster2的内容,后面有关cluster2的内容,可以删除或者注释
######################################
# multi zookeeper&kafka cluster list
######################################
kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=hadoop112:2181,hadoop113:2181,hadoop114:2181
# 修改二:
######################################
# kafka offset storage
######################################
cluster1.kafka.eagle.offset.storage=kafka
#cluster2.kafka.eagle.offset.storage=zk
# 修改三:
######################################
# kafka metrics, 30 days by default
######################################
kafka.eagle.metrics.charts=true
kafka.eagle.metrics.retain=30
# 修改四:注释掉 sqlite 的数据连接信息,开启mysql的,修改数据库的地址
######################################
# kafka jdbc driver address
######################################
kafka.eagle.driver=com.mysql.jdbc.Driver
kafka.eagle.url=jdbc:mysql://hadoop112:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
kafka.eagle.username=root
kafka.eagle.password=000000
- 添加环境变量
[kevin@hadoop112 conf]$ sudo vim /etc/profile
#KAFKA_EAGLE_HOME
export KE_HOME=/opt/module/kafka-eagle-web-1.4.5
export PATH=$PATH:$KE_HOME/bin
[kevin@hadoop112 conf]$ source /etc/profile
启动
- 启动 ZK 以及 KAFKA
[kevin@hadoop112 kafka-eagle-web-1.4.5]$ zk.sh start
[kevin@hadoop112 kafka-eagle-web-1.4.5]$ kfk.sh start
[kevin@hadoop112 kafka-eagle-web-1.4.5]$ xcall.sh jps
- 启动 eagle
[kevin@hadoop112 kafka-eagle-web-1.4.5]$ bin/ke.sh start
- 启动信息
Version 1.4.5 -- Copyright 2016-2020
*******************************************************************
* Kafka Eagle Service has started success.
* Welcome, Now you can visit 'http://192.168.1.112:8048/ke'
* Account:admin ,Password:123456
*******************************************************************
* <Usage> ke.sh [start|status|stop|restart|stats] </Usage>
* <Usage> https://www.kafka-eagle.org/ </Usage>
*******************************************************************
- 登录页面查看监控信息
账号:admin ,密码:123456
网友评论