Windows上安装启动ZooKeeper服务

本文详细介绍了如何下载ZooKeeper安装包,版本为3.4.13,包括配置data和logs文件夹用于存储数据和日志,以及设置zoo.ctg文件中的关键参数如tickTime、initLimit、syncLimit、dataDir、dataLogDir和clientPort。最后,指导如何启动ZooKeeper服务。

一、下载ZooKeeper安装包

本示例用的版本是3.4.13

  1. 官网下载地址:ZooKeeper下载链接
  2. 下载完解压即可,解压目录如下
    解压目录

二、配置ZooKeeper

  1. 在解压目录同级新建data/logs文件夹,用来存放ZooKeeper的相关数据和日志
    在这里插入图片描述
  2. 进入安装目录下的/conf文件夹,复制zoo_sample.ctg新建一个zoo.ctg文件,并修改内容如下
# The number of milliseconds of eachtick  心跳间隔毫秒每次
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 gettinganacknowledgement
syncLimit=5
# the directory where the snapshotisstored.  //镜像数据位置
dataDir=E:\\zookeeper\\data
#日志位置
dataLogDir=E:\\zookeeper\\logs
# the port at which the clientswillconnect  客户端连接的端口
clientPort=2181

三、启动服务

  1. 进入安装目录下的bin目录,双击zkServer.cmd
    在这里插入图片描述
  2. 双击zhCli.cmd连接测试
    在这里插入图片描述

持续更新中…

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qrainly

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值