sudo apt install zookeeperd
sudo systemctl enable zookeeper
sudo systemctl restart zookeeper
root@stretch:/var/lib/zookeeper# /usr/share/zookeeper/bin/zkCli.sh
Connecting to localhost:2181
Welcome to ZooKeeper!
JLine support is enabled
WATCHER::
WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0] ls /
[zookeeper]
[zk: localhost:2181(CONNECTED) 1]
[zk: localhost:2181(CONNECTED) 0] create /config.json {}
Created /config.json
[zk: localhost:2181(CONNECTED) 1]
[zk: localhost:2181(CONNECTED) 0] get /config.json
{}
cZxid = 0xb
ctime = Fri Apr 03 17:27:50 GMT+00:00 2020
mZxid = 0xb
mtime = Fri Apr 03 17:27:50 GMT+00:00 2020
pZxid = 0xb
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 2
numChildren = 0
[zk: localhost:2181(CONNECTED) 1]
[zk: localhost:2181(CONNECTED) 0] delete /config.json
[zk: localhost:2181(CONNECTED) 1]