Windows安装zookeeper

来源:互联网 发布:剑侠情缘捏脸数据 编辑:程序博客网 时间:2024/06/10 23:20

1. 下载页面: http://www.apache.org/dyn/closer.cgi/zookeeper/

2. 解压下载的压缩包:  zookeeper-3.4.10.tar (或zookeeper-3.4.10.tar.gz), 放置在期望的目录, 譬如: C:\Coding\zookeeper-3.4.10

3. 修改配置 

进入conf目录, 将zoo_sample.cfg复制一份, 起名为: zoo.cfg

如下内容供参考:

# The number of milliseconds of each ticktickTime=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 an acknowledgementsyncLimit=5# the directory where the snapshot is stored.# do not use /tmp for storage, /tmp here is just # example sakes.dataDir=D:\\data\\zookeeperdataLogDir=D:\\logs\\zookeeper# the port at which the clients will connectclientPort=2181# the maximum number of client connections.# increase this if you need to handle more clients# maxClientCnxns=60## Be sure to read the maintenance section of the # administrator guide before turning on autopurge.## http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance## The number of snapshots to retain in dataDir# autopurge.snapRetainCount=3# Purge task interval in hours# Set to "0" to disable auto purge feature# autopurge.purgeInterval=1
4. 启动

使用cd命令到bin目录下, 执行以下命令启动

.\zkServer.cmd


enjoy it !
原创粉丝点击