Zookeeper 在 Windows下的安装(入门)

来源:互联网 发布:java输出99乘法表对齐 编辑:程序博客网 时间:2024/05/19 05:02

下面使用的是 zookeeper-3.5.2-alpha.tar.gz 的版本。

1、必须配置好JDK环境


2、下载Zookeeper

使用清华大学开源软件镜像站 :https://mirrors.cnnic.cn/apache/zookeeper/


3、Zookeeper的配置

解压 zookeeper-3.5.2-alpha.tar.gz 后,在conf 目录下 新建一下 zoo.cfg 文件,

# The number of milliseconds of each tick  心跳间隔 毫秒每次tickTime=2000# The number of ticks that the initial# synchronization phase can takeinitLimit=10# The number of ticks that can pass between# sending a request and getting anacknowledgementsyncLimit=5# the directory where the snapshot isstored.  //数据位置dataDir=D:\\zookeeper\\data\\#日志位置dataLogDir=D:\\zookeeper\\logs\\# the port at which the clients willconnect  客户端连接的端口clientPort=2181

4、启动

进入到bin目录,并且启动zkServer.cmd,这个脚本中会启动一个java进程

D:\machine\zookeeper-3.5.2>cd binD:\machine\zookeeper-3.5.2\bin>D:\machine\zookeeper-3.5.2\bin>zkServer.cmd

启动后jps可以看到QuorumPeerMain的进程
D:\machine\zookeeper-3.5.2\bin >jps


启动客户端运行查看一下
D:\machine\zookeeper-3.5.2\bin>zkCli.cmd -server 127.0.0.1:2181



原创粉丝点击