Download Zookeeper
Extract file
Put this file on at least 2 machines
Open conf/zoo.cfg
Select your data directory
dataDir=/yourSelectedDirectory
List the whole Zookeeper cluster with this scheme : server.numberOfServer=ip
server.1=123.456.789.01:2888:5888 server.2=456.789.123.02:2888:5888 server.3=789.123.456.03:2888:5888 [...]
On each machine respect the same numberOfServer with the same ip.
Start Zookeeper
bin/zkServer.sh start
Check if Zookeeper is runing
bin/zkServer.sh status
It is running if we can see
JMX enabled by default Using config: ZOOKEEPER_HOME/bin/../conf/zoo.cfg Mode: follower
Or
JMX enabled by default Using config: ZOOKEEPER_HOME/bin/../conf/zoo.cfg Mode: leader
Verify that numberOfServer matches the selected ip. Go to /yourSelectedDirectory and open myid on each machine.
One the first machine (server.1=123.456.789.01:2888:5888 on the example), we have to see on myid : 1
One the second machine (server.2=456.789.123.02:2888:5888 on the example), we have to see on myid : 2
Etc.
Leader and Followers
On the Zookeeper cluster, we must have only one Leader and many Followers.