Installing and configuring ZooKeeper

The following is the step-by-step process to download, install, and configure ZooKeeper:

  1. The download link for ZooKeeper is http://apache.mirrors.lucidnetworks.net/zookeeper/.

    So, let's download the latest release of ZooKeeper using the following command:

    wget http://apache.mirrors.lucidnetworks.net/zookeeper/stable/zookeeper-3.4.6.tar.gz
    
  2. Extract it as follows:
    tar –xvzfzookeeper-3.4.6.tar.gz
    
  3. Rename this file for an easy naming convention:
    mv zookeeper-3.4.6.tar.gz zookeeper
    
  4. Move it to a desired location:
    mv zookeeper ~/hbinaries/
    cd ~/hbinaries/zookeeper/conf
    vim zoo.cfg
    
  5. Now, add the following lines:
    dataDir=/mnt/disk1/zookeeperData#Assuming the layout of the reader's filesystem>
    tickTime=2000
    clientPort=2181 ...

Get Learning HBase now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.