Pre-requisites
- OpenJDK8
- Zookeeper
Install OpenJDK
|
...
$ vim /home/zookeeper/zookeeper-3.4.13/conf/zoo.cfg |
|
Now, do the below changes in log4.properties
file as follows.
$ vim /home/zookeeper/zookeeper-3.4.13/conf/log4j.properties |
zookeeper.log.dir=/var/log/zookeeper zookeeper.tracelog.dir=/var/log/zookeeper log4j.rootLogger=INFO, CONSOLE, ROLLINGFILE |
...
Zookeeper Service Start on all the Nodes.
The log file will be created in /var/log/zookeeper
of zookeeper named zookeeper.log
, tail the file to see logs for any errors.
$ tail -f /var/log/zookeeper/zookeeper.log |
Verify the Zookeeper Cluster and Ensemble
In Zookeeper ensemble out of three servers, one will be in leader mode and other two will be in follower mode. You can check the status by running the following commands.
$ /home/zookeeper/zookeeper-3.4.13/bin/zkServer.sh status