Windows上安装启动ZooKeeper服务

版权声明:转载请说明,谢谢 https://blog.csdn.net/qrainly/article/details/90247581

一、下载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连接测试
    在这里插入图片描述

持续更新中…

猜你喜欢

转载自blog.csdn.net/qrainly/article/details/90247581
今日推荐