Kafka单机Windows环境搭建

Kafka单机Windows环境搭建

1,安装jdk1.8;安装目录不能有中文空格;

2,下载zookeeper,https://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz

解压到D:\zookeeper-3.4.11之后,在conf目录下面重命名zoo_sample.cfg为zoo.cfg,

在zoo.cfg修改如下内容:

dataDir=D:\\zookeeper-3.4.11\\data
dataLogDir=D:\\zookeeper-3.4.11\\logs

3,双击D:\zookeeper-3.4.11\bin\zkServer.cmd启动zookeeper服务器,

双击D:\zookeeper-3.4.11\bin\zkCli.cmd启动zookeeper客户端,输入ls /显示查询结果[zookeeper]

4,下载kafaka,http://219.238.7.69/files/224800000B6CFE2B/mirrors.shu.edu.cn/apache/kafka/1.0.1/kafka_2.12-1.0.1.tgz

解压到D:\kafka_2.12-1.0.1之后,启动cmd窗口,

D:\>cd d:\kafka_2.12-1.0.1\bin\windows

D:\kafka_2.12-1.0.1\bin\windows>kafka-server-start.bat ..\..\config\server.properties

启动Kafka;

5,下载编译好的Kafka Manager,http://pan.baidu.com/s/1miDMuyG

解压缩至D:\kafka-manager-1.3.3.4

6,修改D:\kafka-manager-1.3.3.4\conf\application.conf中的内容kafka-manager.zkhosts="127.0.0.1:2181",

启动cmd窗口,

D:\>cd kafka-manager-1.3.3.4\bin

D:\kafka-manager-1.3.3.4\bin>kafka-manager.bat -Dconfig.file=..\conf\application.conf

启动Kafka Manager,使用http://localhost:9000/进行界面访问;

参考资料:

1,《Kafka入门与实践》牟大恩 著

2,https://my.oschina.net/wangjiankui/blog/653139

上一篇:极光推送小结 - iOS


下一篇:CentOS7 yum方式 安装mysql 5.7.28步骤