Zookeeper安装
1. 安装wget http://www.apache.org/dist//zookeeper/zookeeper-3.3.6/zookeeper-3.3.6.tar.gz
2 tar zxvf zookeeper-3.3.6.tar.gz
3 cd zookeeper-3.3.6
4 cp conf/zoo_sample.cfg conf/zoo.cfg
启动:
5 ./bin/zkServer.sh start
停止:
6 ./bin/zkServer.sh stop
简单操作:
./bin/zkCli.sh -server 127.0.0.1:2181
[zk: 127.0.0.1:2181(CONNECTED) 2] create /test "hello"
Created /test
[zk: 127.0.0.1:2181(CONNECTED) 3] get /test
"hello"
cZxid = 0x8
ctime = Wed Dec 28 10:03:24 CST 2016
mZxid = 0x8
mtime = Wed Dec 28 10:03:24 CST 2016
pZxid = 0x8
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 7
numChildren = 0
|