Wednesday, 11 July 2018

Zookeeper 3.4.6. Installation & Configuration


Apache Zookeeper is a distributed co-ordination service to manage large set of hosts. It is essentially a centralized service for distributed systems to a hierarchical key-value store, which is used to provide a distributed configuration service, synchronization service, and naming registry for large distributed systems.



Prerequisites

Java 8

Downloading and Installing Zookeeper

Download zookeeper-3.4.6 using below command on /usr/local directory.
$ cd /usr/local
$ sudo wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.6/ zookeeper-3.4.6.tar.gz
Unpack the compressed tar file by using this command
$ sudo tar –xvzf zookeeper-3.4.6.tar.gz
Rename zookeeper-3.4.6 directory to zookeeper in /usr/local directory by using give command.
$ sudo mv zookeeper-3.4.6 zookeeper

Setting up Zookeeper Environment Variables

First we need to set environment variable for zookeeper. Edit ~/.bashrc file.
$ sudo nano ~/.bashrc
Append following values at end of file and save the file.
export ZOOKEEPER_HOME=/usr/local/zookeeper
export PATH=$ ZOOKEEPER_HOME/bin:$PATH
Change the ownership and permissions of the directory /usr/local/zookeeper
$ sudo chown -R hdfs:hdfs /usr/local/zookeeper
$ sudo chmod -R 755 /usr/local/zookeeper
Reload the configuration file ~/.bashrc with the following command.
$ source ~/.bashrc

Start zookeeper services

Start Zookeeper service using this command.
$ zkServer.sh start
Showing Zookeeper is starting.
JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
Share:

Total Pageviews

Lables

Powered by Blogger.

Followers