Windows11本地安装Zookeeper(最新)

一、下载Zookeeper安装包

前提:需要有java1.8的运行环境,没有安装看这篇文章:Java JDK1.8 安装教程和环境配置_java 1.8-CSDN博客

测试java环境:

win+r输入cmd,打开命令行窗口,输入命令: java -version

出现版本号,则环境配置正确

1.zookeeper官网:​​​

这里我们使用3.4.11版本:zookeeper3.4.11

2.解压压缩包

注意:解压路径最好在没有中文路径的目录下(不要出现中文和空格),解压完如下图:

二、修改配置文件

1.在当前目录下创建一个data文件夹(存放数据)和log文件夹(存放日志)

2.进入conf目录,复制zoo_sample.cfg文件,重命名为zoo.cfg

3.使用记事本打开zoo.cfg文件

配置如下:

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=../data

dataLogDir=../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

dataDir=../data指定数据保存路径

dataLogDir=../log指定日志文件保存路径

注:其中dataDir和dataLogDir也可以使用绝对路径,两种都可以。

三、启动测试

1.进入zookeeper的bin目录下,双击 zkServer.cmd

(注:windows的启动配置文件后缀一般都为.cmd)

启动后如下:

2.启动客户端

回到bin目录下,双击 zkCli.cmd ,看到Welcome to ZooKeeper!说明成功!

相关推荐
BYSJMG1 小时前
计算机毕设选题做什么好?基于大数据的用户健身行为数据分析与可视化系统,Hadoop+Spark处理
大数据·人工智能·hadoop·数据分析·spark·课程设计
知见漫记5 小时前
AI 桌面 Agent 本地执行能力技术对照:沙箱机制与权限模式拆解
大数据·人工智能
xcl09257 小时前
幼儿托育系统开发实战:从需求分析到上线全流程指南
java·大数据·需求分析
cspttty7 小时前
国际经济与贸易专业考什么证对就业有帮助
大数据
足球魅力7 小时前
哪款足球软件能分析凯利指数大数据?
大数据·业界资讯
xwz小王子8 小时前
机器人的“最后一毫米”: 新加坡南洋理工大学Facet-0如何教会基础模型“感受”自己的动作?
大数据·人工智能·机器人
腾视科技-AI8 小时前
腾视科技AIBOX双版本重磅发布!本地安全与全球适配,解锁视频智能新可能
大数据·人工智能·科技·安全·大模型·腾视科技·ai算力盒
姜穆澜8 小时前
OneID 从 0 到 1 完整生产案例(五)
大数据·notepad++
geneculture9 小时前
《融智学:终结信息定义纷争的时代范式》 拓展分析述评
大数据·人工智能·信息科学·融智学的重要应用·哲学与科学统一性·融智时代(杂志)·比较分析
刘同学的 AI学习手记9 小时前
每日 AI PM 情报 · 2026-08-31
大数据·人工智能