Kafka Download Windows
Kafka on Windows: A Step-by-Step Guide
Apache Kafka is a powerful distributed streaming platform for building real-time data pipelines and streaming applications. While primarily associated with Linux-like environments, Kafka can run smoothly on Windows systems. Here’s how to get it up and running on your Windows machine.
Prerequisites
- Java: Kafka is built with Java, so you’ll need a Java Development Kit (JDK) installed. Version 8 or later is required. Download and install from the official Oracle website.
- Windows Subsystem for Linux (Optional): WSL 2 provides a Linux-like environment within Windows, making the Kafka installation process resemble standard Linux setups. Microsoft’s documentation provides instructions on setting up WSL.
Step 1: Download Apache Kafka
- Navigate to the official Apache Kafka downloads page:
- Under “Binary downloads,” select the latest stable release of Kafka.
- Choose the download option with your preferred Scala version (2.12 or 2.13 are common choices).
Step 2: Extract the Archive
- Once downloaded, extract the downloaded .tgz file to your desired location (example: C:\kafka). This will be your Kafka installation directory.
- You can use tools like 7-Zip or WinRAR to extract the file.
Step 3: Configure Environment Variables (Optional)
- This step is recommended for easier use of Kafka commands.
- Search for “environment variables” in the Windows Start menu.
- Click on “Edit the system environment variables.”
- Under “System variables,” click “New…”
- Variable Name: KAFKA_HOME Variable Value: (The path to your Kafka installation directory, e.g., C:\kafka)
- Click “OK”.
- Find the Path variable under “System variables,” and click “Edit.”
- Click “New” and add %KAFKA_HOME%\bin\windows
- Click “OK” on all windows.
Step 4: Start Zookeeper
Apache Kafka utilizes Zookeeper to manage the cluster.
- Open a command prompt or terminal (or a WSL terminal, if using WSL).
- Navigate to your Kafka installation directory (e.g., cd C:\kafka)
- Run the following command to start Zookeeper:
- bin\windows\zookeeper-server-start.bat config\zookeeper.properties
Step 5: Start Kafka Server
- Open a new command prompt or terminal.
- Navigate to your Kafka installation directory.
- Run the following command to start the Kafka server:
- bin\windows\kafka-server-start.bat config\server.properties
Step 6: Verification
To ensure Kafka is running:
- Open a new command prompt or terminal.
- Run the following command to create a test topic:
- bin\windows\kafka-topics.bat –create –topic test-topic –bootstrap-server localhost:9092
- You should see a confirmation message: “Created topic test-topic.”
Congratulations! You’ve successfully installed and started Apache Kafka on your Windows machine.
Additional Notes:
- Firewalls: Ensure your firewall is configured to allow connections to Kafka and Zookeeper ports (the default ports are 2181 for Zookeeper and 9092 for Kafka).
- WSL: If utilizing the Windows Subsystem for Linux, the setup closely resembles a Linux installation.
Conclusion:
Unogeeks is the No.1 IT Training Institute for Apache kafka Training. Anyone Disagree? Please drop in a comment
You can check out our other latest blogs on Apache Kafka here – Apache kafka Blogs
You can check out our Best In Class Apache Kafka Details here – Apache kafka Training
Follow & Connect with us:
———————————-
For Training inquiries:
Call/Whatsapp: +91 73960 33555
Mail us at: info@unogeeks.com
Our Website ➜ https://unogeeks.com
Follow us:
Instagram: https://www.instagram.com/unogeeks
Facebook: https://www.facebook.com/UnogeeksSoftwareTrainingInstitute
Twitter: https://twitter.com/unogeek