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!说明成功!

相关推荐
腾讯云大数据8 小时前
腾讯云大数据计算智能:从结构化 SQL 到多模态 AI Workload 的融合范式
大数据·人工智能·腾讯云
AI职业加油站8 小时前
大数据采集工程师:技术栈全景图与实战路径
大数据·人工智能·数据分析
老白讲技术10 小时前
2026年国内APP开发与软件定制服务商能力观察:从AI应用到行业系统开发
大数据·人工智能·ai·app·软件需求·app开发
荣-10 小时前
从两天到十几分钟:一套 YT Crash 自动化分析工具完整工程复盘
大数据·运维·自动化
人工智能培训12 小时前
大模型驱动下传统大数据架构的变革方向
大数据·人工智能·重构·架构·agent·agi
蜡笔削薪12 小时前
财联万业(杭州)数字科技有限公司能否给代理划定独家经营区域?
大数据·人工智能·python·科技
动恰客流统计13 小时前
零食集合店爆火背后:客流统计技术如何重构新零售运营决策
大数据·人工智能
B8017913Y15 小时前
2026撰写行业报告总写不完零散专业词汇?可系统梳理行业专业词汇
大数据·人工智能
2601_9623413015 小时前
计算机毕业设计之jsp考研在线复习平台
java·大数据·开发语言·hadoop·python·考研·课程设计
海天鹰16 小时前
WIN10修改窗口标题栏失去焦点背景色
windows