解壓zookeeper-3.4.13.tar.gz ,配置環境變量
html
conf/zoo.cfg配置:java
# 時間單元,其餘的時間都是以此爲單元 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 an acknowledgement syncLimit=5 # the directory where the snapshot is stored. # do not use /tmp for storage, /tmp here is just # example sakes. dataDir=/root/javaApp/zookeeper-3.4.13/dataDir dataLogDir=/root/javaApp/zookeeper-3.4.13/dataLogDir # the port at which the clients will connect clientPort=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
打開命令行 ./zkCli.shapache
cZxid = 0x0 節點id ctime = Thu Jan 01 08:00:00 CST 1970 節點建立時間 mZxid = 0x0 節點修改的id mtime = Thu Jan 01 08:00:00 CST 1970節點修改時間 pZxid = 0x0 子節點id cversion = -1 子節點版本 dataVersion = 0 此節點數據版本 aclVersion = 0 權限的版本 ephemeralOwner = 0x0 是0x0是永久節點,不是0x0就是臨時節點 dataLength = 0 數據長度 numChildren = 1 子節點數量