• 首页
  • 产品中心
    • 数式Oinone四大产品

      低代码开发平台无代码开发平台集成开发平台AI大模型开发
    • 数式Oinone体系能力

      用户与组织权限管理文件管理消息中心国际化业务审计
    • 数式Oinone核心产品特性

      低无一体面向软件公司场景无限制应用级扩容可分可合
  • 服务中心
    • 客户服务

      预约演示方案咨询私有部署找人定制
    • 开发者

      问答下载
    • Oinone学院

      社区学习

    《精讲面向软件公司的低代码平台——以Oinone为例》

  • 合作伙伴
    渠道申请伙伴名录专家库
  • 关于数式
0571-88757863

Zookeeper安装与注意事项


一、下载安装包

下载地址 https://zookeeper.apache.org/releases.html

历史版本下载地址 https://archive.apache.org/dist/zookeeper/

推荐选择3.5.8及以上版本, 以下使用3.8.4版本进行安装。

注意

以下命令均需在 Zookeeper 的安装目录中执行。你可以通过命令 cd <Zookeeper安装目录> 进入该目录。 在 Linux/macOS 系统中,请使用默认终端;在 Windows 系统中,请使用 PowerShell。

二、安装

(一)解压

可视化工具或者使用如下命令解压

# Linux/macOS
tar zxvf apache-zookeeper-3.8.4-bin.tar.gz -C <Zookeeper安装目录>

Windows可以尝试使用以上命令,如果没有tar命令可使用Windows资源管理器进行解压缩

提示

为了方便后续操作,可以为 Zookeeper 安装目录创建软链接。

建立软链(可选)

# Linux/macOS
ln -s apache-zookeeper-3.8.4-bin zookeeper
# Windows
New-Item -Path .\zookeeper\ -ItemType SymbolicLink -Target .\apache-zookeeper-3.8.4-bin

(二)配置

创建数据存储目录

# Linux/macOS/Windows
mkdir data

修改Zookeeper配置

# Linux/macOS
cat > ./conf/zoo.cfg << EOF
tickTime=2000
initLimit=10
syncLimit=5
dataDir=data
clientPort=2181
clientPortAddress=127.0.0.1
autopurge.snapRetainCount=3
autopurge.purgeInterval=1
admin.serverPort=8888
admin.enableServer=false
EOF
# Windows
Set-Content -Path ./conf/zoo.cfg -Value @(
    "tickTime=2000"
    "initLimit=10"
    "syncLimit=5"
    "dataDir=data"
    "clientPort=2181"
    "clientPortAddress=127.0.0.1"
    "autopurge.snapRetainCount=3"
    "autopurge.purgeInterval=1"
    "admin.serverPort=8888"
    "admin.enableServer=false"
)

三、运行

# Linux/macOS
./bin/zkServer.sh start
# Windows
.\bin\zkServer.cmd

四、停止

# Linux/macOS
./bin/zkServer.sh stop
# Windows
关闭运行的终端
编辑此页
最近更新:2026/1/15 04:02
上一页
RocketMQ安装与注意事项
下一页
MySQL安装与注意事项
默认页脚
Copyright © 2026 Mr.Hope