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

相关推荐
caimouse21 小时前
Reactos 第 7 章 视窗报文 — 7.5 视窗报文的发送
windows
AC赳赳老秦1 天前
OpenClaw+Power Apps 实战:自动生成 Power Apps 应用、连接 Excel 数据源
大数据·开发语言·python·serverless·excel·deepseek·openclaw
keke.shengfengpolang1 天前
数据科学与大数据技术和大数据管理与应用怎么抉择?
大数据
产业家1 天前
AI长跑,来到了腾讯的主场
大数据·人工智能
小赖同学啊1 天前
可信数据空间中异构数据处理与安全保障方案
大数据
HavenlonLabs1 天前
重塑链上未来的隐形基石:长期主义下的生态演进
大数据·人工智能·安全·区块链
huangdong_1 天前
京东商品图片视频批量下载与m3u8视频合并技术完整实现方案
大数据·前端·数据库
Java 码思客1 天前
【ElasticSearch从入门到架构师】第9章:ES 读写底层流程深度拆解
大数据·elasticsearch·搜索引擎
ttt606_1 天前
门店业绩上报系统功能拆解:门店业绩上报如何提高数据精确度与时效性?
大数据·人工智能
ACP广源盛139246256731 天前
GSV2221@ACP#DP 1.4 MST 多屏转换芯片,物理 AI 多模态交互的视觉中枢
大数据·人工智能·嵌入式硬件·gpt·spark