Kafka Installation

How to install Kafka quickly in Windows 10? Complete Steps

Downloading the Required Files

Installation

A. Java Setup

1. Start the JRE installation and hit the “Change destination folder” checkbox, then click ‘Install.’

2. Change the installation directory to any path without spaces in the folder name. E.g. C:\Java\jre1.8.0_xx\. (By default it will be C:\Program Files\Java\jre1.8.0_xx), then click ‘Next.’

3. Now open the system environment variables dialogue by opening Control Panel -> System -> Advanced system settings -> Environment Variables.

4. Hit the New User Variable button in the User variables section, then type JAVA_HOME in Variable name and give your jre path in the Variable value. It should look like the below image:

(Java path and version may change according to the version of Kafka you are using)

5. Now click OK.

6. Search for a Path variable in the “System Variable” section in the “Environment Variables” dialogue box you just opened.

7. Edit the path and type “;%JAVA_HOME%\bin” at the end of the text already written there, just like the image below:

8. To confirm the Java installation, just open cmd and type “java –version.” You should be able to see the version of Java you just installed.

If your command prompt somewhat looks like the image above, you are good to go. Otherwise, you need to recheck whether your setup version matches the correct OS architecture (x86, x64), or if the environment variables path is correct.

B. Setting Up Kafka

check GitHub link for simplicity

  1. Go to your Kafka config directory.

For me, it's C:\kafka\config (I have renamed the existing folder to Kafka for simplicity)

Edit server.properties file
# A comma-separated list of directories under which to store log files
log.dirs=c:/kafka/kafka-logs (close file after saving)

Edit zookeeper.properties file
# the directory where the snapshot is stored.
dataDir=c:/kafka/zookeeper-data (close file after saving)

2. Always start zookeeper first

go to kafka folder, then start the zookeeper server and pass the config file to it.
c:\kafka > .\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties

→ you can see zookeeper has been started on port #2181

Start Kafka server

new cmd → go to Kafka folder, then start Kafka server and pass config file to it.

c:\kafka > .\bin\windows\kafka-server-start.bat .\config\server.properties

→ you can see Kafka server is running with brokerId=0

Check logs for details

you can check details in a log about the server
go to → C:\kafka\logs

Kafka Tutorials

Next →

Previous ←

--

--

--

I am Full Stack Java Developer @ Tata Strive | Get blogs and tutorials related to the (React | Kafka | DevOps) | Follow me on LinkedIn https://www.linkedin.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Build Custom Generators for State Machines Easily 🚀

Twin Tiers Cinderella

Container management platforms: road to containeriZENtion

Resize a PDF Document using Java

Bluehost vs VPS Hosting, What is Better?

Java Object Oriented Design — Java Class Instance

Partnership Announcement: MetaMerge joins forces with SupraOracles for mutual cooperation in GameFi…

Sequence diagram

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sagar Kudu

Sagar Kudu

I am Full Stack Java Developer @ Tata Strive | Get blogs and tutorials related to the (React | Kafka | DevOps) | Follow me on LinkedIn https://www.linkedin.com

More from Medium

Configuring an LDAP user registry in API Connect for user authentication

Devops Container Orchestration Using the Docker Swarm Model

Devops Container Orchestration Using the Docker Swarm Model

Randomized Database Ids

Docker with commands