ZooKeeper安装运行(Windows10)

ZooKeeper是Hadoop的正式子项目,它是一个针对大型分布式系统的可靠协调系统,提供的功能包括:配置维护、名字服务、分布式同步、组服务等。ZooKeeper的目标就是封装好复杂易出错的关键服务,将简单易用的接口和性能高效、功能稳定的系统提供给用户。

管网:https://zookeeper.apache.org/

下载地址:https://mirrors.cnnic.cn/apache/zookeeper/

 

下载:

    通过上面提供的下载地址,选择相应的版本,选择下载的版本为:zookeeper-3.4.10.

    下载到相应的文件之后,并进行解压。

增加配置文件:

    在解压目录下conf中创建配置文件(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 anacknowledgement
syncLimit=5
# the directory where the snapshot isstored.  //镜像数据位置
dataDir=D:\\data\\zookeeper
#日志位置
dataLogDir=D:\\logs\\zookeeper
# the port at which the clients willconnect  客户端连接的端口
clientPort=2181

启动:

    完成配置文件编写之后,通过windows运行输入cmd,进入命令行模式,执行解压目录bin目录下的zkserver.cmd文件

D:\21_Project\80_SpringBoot\zookeeper-3.4.10\bin>zkServer.cmd

164037_8le3_2273688.png

查看启动状态:

D:\21_Project\80_SpringBoot\zookeeper-3.4.10\bin>zkCli.cmd -server 127.0.0.1:2181

通过上面命令可以进入zookeeper client端,在此可以查看状态,以及已经注册了哪些服务

 

转载于:https://my.oschina.net/sdlvzg/blog/1305383

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值