testing env:
ubuntu 16 LTS
we just test stand-alone mode of zookeeper, in productin environment, at least 3 zookeepers are recommended.
steps
install java
to make it simple, I just installed everything about java
1 |
|
install zookeeper1
2
sudo apt-get install zookeeper zookeeperd
start the server:1
2
sudo service zookeeper start
we can also download the zookeeper tar from the official website
http://apache.org/dist/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz
once download the tar file, directly run1
2
tar zxvf zookeeper-3.4.9.tar.gz
The good thing is we can directly use ‘sh’ script in the sub ‘bin’ directory
./bin/zkCli.sh can be used to connect local zookeeper running server
zookeeper quick start and reference
the official 'wiki' provides a lot of useful information to help start with zookeeper,
but following link is more simple to start with,
https://www.tutorialspoint.com/zookeeper/index.htm
golang zookeeper client testing
go-zookeeper is the opensource zookeeper client written in go, it has supported basic operations in zookeeper
https://github.com/wy3148/go-zookeeper.git
git clone https://github.com/wy3148/go-zookeeper.git
1 | package main |