linux下kafka搭建

一、前期准备

1、jdk环境配置  https://blog.csdn.net/xlecho/article/details/97266591

2、kafka安装包  https://kafka.apache.org/downloads

二、启动命令

首先要启动zookeeper

#启动命令
bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
#关闭命令
bin/zookeeper-server-stop.sh -daemon config/zookeeper.properties

启动kafka

#启动命令
bin/kafka-server-start.sh -daemon config/server.properties
#关闭命令
bin/kafka-server-stop.sh config/server.properties

三、同一台机子部署集群

注意:只需要启动一个zookeeper,并且端口都是2181,并且kafka配置文件中的zookeeper必须设置为

 

 测试截图:

 

四、遇到问题

 解决办法:修改kafka-server-start.sh 文件中export KAFKA_HEAP_OPTS="-Xmx256M -Xms128M"

 解决办法,配置文件 server.properties  listeners=PLAINTEXT://192.168.0.182:9092  改成localhost 请不要写死地址

五、可视化工具

https://pan.baidu.com/s/1dHznuWRcDWtXkU-tjAb7_g  

2pqw

六、参考教程

https://www.cnblogs.com/zhaoshizi/p/12154518.html 

https://blog.csdn.net/qq_39501726/article/details/81938695

https://blog.csdn.net/myfortune/article/details/80927575?utm_source=blogxgwz0

https://blog.csdn.net/qq_38976805/article/details/90577556

posted @ 2020-07-24 11:32  榕树下的回忆  阅读(221)  评论(0编辑  收藏  举报