Installing Apache ZooKeeper on Windows

Shahrukh Aslam
1 min readFeb 10, 2017

--

Download and Extract Apache Zookeeper using 7-Zip
Download: http://zookeeper.apache.org/releases.html#download

JRE is required to run Apache Zookeeper.

At the time of writing this, the stable version of zookeeper is 3.4.9

You can download and unzip it anywhere but for the sake of this guide, i am assuming that zookeeper is extracted in C:\Tools\

Instructions:

  1. Copy and Rename “zoo_sample.cfg” to “zoo.cfg” in C:\Tools\zookeeper-3.4.9\conf
  2. Create data directory in zookeeper folder.
  3. Find & edit dataDir=/tmp/zookeeper to C:\\Tools\\zookeeper\\zookeeper-3.4.9\\data using any text editor like notepad or notepad++. (change the zookeeper version as yours)
    dataDir=C:\\Tools\\zookeeper\\zookeeper-3.4.9\\data
  4. Add entries in System Environment Variables.
    Add in System Variables ZOOKEEPER_HOME = C:\Tools\zookeeper-3.4.9
    Edit System Variable named “Path” and append this in the last ;%ZOOKEEPER_HOME%\bin;
  5. Open command prompt and type zkserver.

zkserver will start the zookeeper on the defualt port which is 2181, you can change the default port in zoo.cfg file

--

--