ZooKeeper 基础1

2022-03-25 11:32:21 浏览数 (1)

安装

解压

Tip: 其实解压就可以直接运行了,确保有JVM ZooKeeper runs in Java, release 1.6 or greater (JDK 6 or greater)

代码语言:javascript复制
[root@h101 zk]# tar -zxvf zookeeper-3.4.6.tar.gz 
zookeeper-3.4.6/
zookeeper-3.4.6/src/
zookeeper-3.4.6/src/lastRevision.sh
zookeeper-3.4.6/src/zookeeper.jute
zookeeper-3.4.6/src/c/
zookeeper-3.4.6/src/c/missing
zookeeper-3.4.6/src/c/ChangeLog
zookeeper-3.4.6/src/c/src/
...
...
zookeeper-3.4.6/lib/jdiff/
zookeeper-3.4.6/lib/jdiff/zookeeper_3.1.1.xml
zookeeper-3.4.6/lib/jdiff/zookeeper_3.4.6-SNAPSHOT.xml
zookeeper-3.4.6/lib/jdiff/zookeeper_3.4.6.xml
zookeeper-3.4.6/lib/slf4j-api-1.6.1.jar
zookeeper-3.4.6/lib/log4j-1.2.16.jar
zookeeper-3.4.6/lib/netty-3.7.0.Final.jar
zookeeper-3.4.6/lib/jline-0.9.94.LICENSE.txt
[root@h101 zk]# ls
zookeeper-3.4.6  zookeeper-3.4.6.tar.gz
[root@h101 zk]# 

默认配置

代码语言:javascript复制
[root@h101 zk]# cd zookeeper-3.4.6
[root@h101 zookeeper-3.4.6]# ls
bin          conf        docs             lib          README_packaging.txt  src                      zookeeper-3.4.6.jar.md5
build.xml    contrib     ivysettings.xml  LICENSE.txt  README.txt            zookeeper-3.4.6.jar      zookeeper-3.4.6.jar.sha1
CHANGES.txt  dist-maven  ivy.xml          NOTICE.txt   recipes               zookeeper-3.4.6.jar.asc
[root@h101 zookeeper-3.4.6]# grep -v "^#" conf/zoo_sample.cfg 
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/tmp/zookeeper
clientPort=2181
[root@h101 zookeeper-3.4.6]# 

0 人点赞