How to Install ZooKeeper on Windows 10
ZooKeeper is a distributed coordination service that helps manage distributed applications by providing synchronization primitives. In this tutorial, we will learn how to install ZooKeeper on Windows 10.
Prerequisites
Before we begin, ensure that you have the following:
- Windows 10
- Java Development Kit (JDK) installed
Step 1: Download ZooKeeper
- Visit the ZooKeeper download page on the Apache website.
- Scroll down to the latest stable release and download the binary file with the
.tar.gzextension (e.g.,zookeeper-X.Y.Z.tar.gz).
Step 2: Extract the ZooKeeper file
- Navigate to the downloaded
.tar.gzfile and extract it to a directory of your choice (e.g.,C:\zookeeper). - Rename the extracted folder to
zookeeper.
Step 3: Configure ZooKeeper
- Open the
zookeeperfolder and navigate to theconfdirectory. - Find the
zoo_sample.cfgfile and rename it tozoo.cfg. - Open the
zoo.cfgfile with a text editor. - Modify the
dataDirproperty to specify the directory where the ZooKeeper data will be stored. For example,dataDir=C:\\zookeeper\\data. - Save and exit the file.
Step 4: Start ZooKeeper
- Open Command Prompt.
- Navigate to the
bindirectory inside thezookeeperfolder. - Run the
zkServer.cmdfile by typing.\zkServer.cmd. - Wait until you see the output
[ZooKeeperServerMain] INFO org.apache.zookeeper.server.ZooKeeperServerMain - Starting.
Congratulations, you have successfully installed and started ZooKeeper on Windows 10!