下载安装
- 下载安装包zookeeper-3.4.8.tar.gz
- 解压zookeeper-3.4.8.tar.gz,生成文件夹zookeeper-3.4.8
- 进入zookeeper-3.4.8文件夹的conf目录,拷贝zoo_sample.cfg为zoo.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=e:\\zookeeper-3.4.8\\datadataLogDir=e:\\zookeeper-3.4.8\\log# 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
启动
- 启动Zookeeper,双击bin目录下的zkServer.cmd
-
客户端测试
- 客户端连接,查看数据路径,双击bin目录下zkCli.cmd
就可以看到目前Zookeeper数据的存储路径为/zookeeper/quota。