1.下载kafka非源码安装包

 

2.修改config\zookeeper.properties

# 修改成自己的目录
dataDir=G:\kafka\zookeeper\data

 

3.启动zookeeper

bin\windows\zookeeper-server-start.bat config\zookeeper.properties

 

4.启动kafka

bin\windows\kafka-server-start.bat config\server.properties

  

 5.测试

#创建Topic
bin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic kafka

#显示数据
bin\windows\kafka-topics.bat --list --zookeeper localhost:2181