zhaoyw 2019,4,25
http://kafka.apache.org/downloads 下载kafka_2.11-2.2.0.tgz
解压缩到D:\software\kafka_2.11-2.2.0
D:\software\kafka_2.11-2.2.0目录下创建文件夹zookeeper
在zookeeper目录下创建两个文件夹data、 logs
D:\software\kafka_2.11-2.2.0目录下创建文件夹kafka_logs
修改D:\software\kafka_2.11-2.2.0\config\zookeeper.properties
dataDir=D:\\software\\kafka_2.11-2.2.0\\zookeeper\\data
dataLogDir=D:\\software\\kafka_2.11-2.2.0\\zookeeper\\logs
修改D:\software\kafka_2.11-2.2.0\config\server.properties
log.dirs=D:\\software\\kafka_2.11-2.2.0\\kafka_logs
启动zookeeper
D:\software\kafka_2.11-2.2.0>.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
(也可创建批处理文件)
zookeeper-zyw.bat
@echo off
start cmd /k "cd/d D:\software\kafka_2.11-2.2.0 &&.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties"
启动kafka
D:\software\kafka_2.11-2.2.0>.\bin\windows\kafka-server-start.bat .\config\server.properties
(也可创建批处理)
kafka-zyw.bat
@echo off
start cmd /k "cd/d D:\software\kafka_2.11-2.2.0 &&.\bin\windows\kafka-server-start.bat .\config\server.properties"