How to Install ZooKeeper on Windows 11

Apache ZooKeeper is a distributed coordination service that is commonly used in distributed systems. In this tutorial, we will guide you through the process of installing ZooKeeper on Windows 11.

Prerequisites

Before installing Apache ZooKeeper, make sure you have the following prerequisites installed on your Windows 11 machine:

Step 1: Downloading ZooKeeper

  1. Navigate to the ZooKeeper download page.
  2. Select the version you want to download. We recommend choosing the latest stable version.
  3. Click on the link to download the binary release.

Step 2: Extracting ZooKeeper

  1. Once the download is complete, extract the contents of the .tar.gz file to your desired directory.
  2. Rename the extracted directory to zookeeper.

Step 3: Configuring ZooKeeper

  1. Navigate to the zookeeper/conf directory.
  2. Rename the zoo_sample.cfg file to zoo.cfg.
  3. Open the zoo.cfg file using a text editor.
  4. Configure the dataDir parameter to point to a directory where ZooKeeper will store its data. For example: C:/zookeeper/data.
  5. Save and close the zoo.cfg file.

Step 4: Starting ZooKeeper

  1. Open a Command Prompt window with administrator privileges.

  2. Navigate to the zookeeper/bin directory.

  3. Run the following command to start ZooKeeper:

    .\zkServer.cmd
    
  4. ZooKeeper should now be running. Keep the Command Prompt window open.

Step 5: Testing ZooKeeper

  1. Open another Command Prompt window with administrator privileges.

  2. Navigate to the zookeeper/bin directory.

  3. Run the following command to connect to ZooKeeper:

    .\zkCli.cmd
    
  4. You should now see the ZooKeeper prompt. Type help to see a list of available commands.

  5. To test if ZooKeeper is functioning correctly, run the following command:

    create /test test
    
  6. If successful, you should see the message Created /test.

  7. Type exit to exit the ZooKeeper prompt.

Congratulations, you have successfully installed Apache ZooKeeper on your Windows 11 machine!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!