Windows 下 Kafka 安装

                              Windows 下 Kafka 安装

 

Apache所有的开源软件的地址

https://mirrors.tuna.tsinghua.edu.cn/apache/

https://www.apache.org/dyn/closer.cgi

 

下载 Kafka 

https://www.apache.org/dyn/closer.cgi?path=/kafka/2.1.0/kafka_2.11-2.1.0.tgz

解压后

目录说明

bin目录:启动,停止等命令。 
config目录: 配置文件 
libs目录: 类库

启动和停止kafka

zookeeper.properties 配置修改

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
dataDir=D:/zookeeper/dataTmp
dataLogDir=D:/zookeeper/log
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

启动 Zookeeper

 

启动 zookeeper 端口 2181
zookeeper-server-start.bat ../../config/zookeeper.properties

 

启动Kafka 

启动kafka,端口9092
kafka-server-start.bat ../../config/server.properties

如果想连接数据库

 
Kafka Connect 启动:(此处不需要,用于连接数据库)
connect-standalone.bat ../../config/connect-standalone.properties ../../config/mysql.properties

 

停止kafka

进入bin\windows目录下,按先后顺序启动

kafka-server-stop.bat
zookeeper-server-stop.bat

 

 

 

 

 

 

 

 

参考资料:

 

 

 

 

 

wangxiaoming CSDN认证博客专家 架构 Spring Boot Redis
博客是很好的总结和记录工具,如果有问题,来不及回复,关注微信公众号:程序员开发者社区,获取我的联系方式,向我提问,也可以给我发送邮件,联系 1275801617@qq.com
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页
实付 19.89元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值