zookeeper-3.5.2-alpha

Decompression

1
2
3
4
5
6
7
8
9
10
11
tar -xvf zookeeper-3.5.2-alpha.tar.gz
cp zoo_sample.cfg zoo.cfg

vim zoo.cfg
# modify config
admin.serverPort=8081
dataDir=/home/xxx/zookeeper-3.5.2-alpha/data

# check java version
echo $JAVA_HOME
java -version

Test

1
2
3
4
5
6
7
8
9
10
11
12
13
./zkServer.sh start
# check
ps -ef|grep zookeeper

# if no progress
./zkServer.sh start-foreground

# shell client
./zkCli.sh
...
[zk: localhost:2181(CONNECTED) 0] create /key "hello zookeeper"
Created /key
[zk: localhost:2181(CONNECTED) 1] quit