您的位置:首页 > 其它

Zookeeper 在 Windows下的安装(入门)

2017-11-07 15:41 295 查看
下面使用的是 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 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:\\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 bin
D:\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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: