How to install Kafka and Zookeeper on windows - Manoj Jha

Manoj Jha

Robotic Process Automation, Abbyy Flexicapture, Python, JavaScript, C#. Machine learning and Data Science

How to install Kafka and Zookeeper on windows

Share This

 Apache Kafka and Zookeeper are two distributed systems technologies that are often used together. Kafka is a distributed streaming platform that can be used to publish, subscribe to, store, and process streams of records in real-time. Zookeeper is a distributed coordination service that can be used to provide reliable distributed services such as leader election, configuration management, and synchronization.

To install Kafka and Zookeeper on Windows, you will need to:

1. Install Java. Kafka and Zookeeper require Java version 8 or higher. You can download the latest version of Java from the Oracle website.

2. Download Kafka. You can download the latest versions of Kafka from the Apache Kafka website. download link


3. Extract the Kafka archives. Once you have downloaded the Kafka archives, extract them to a directory of your choice.


4. Set environment variables. You need to set the following environment variables:
KAFKA_HOME=<path-to-kafka-directory>
    or else you can copy the directory path and append to the path of environment variables
    
5. After adding the path in the environment variable open the new command prompt and go to the Kafka directory and type the below command to start the zookeeper:
.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
Your zookeeper server should be up and running like the below image:
6. 
Now open another command prompt and change the directory to the Kafka folder. Run the Kafka server using the command:
.\bin\windows\kafka-server-start.bat .\config\server.properties

Now kafka is running and ready to stream data.

Note: If you are facing an error like the below:
C:\Kafka\kafka>.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties The system cannot find the path specified.

In this case, you need to check your Java path in the environment variable. For more details on fixing this error visit 

Please ask questions in the comment if you have any doubts about installing and running Kafka












No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

If the post was helpful to you, Please donate us so we can create more useful content

Support by Donate

Pages