BSR Tutorials

Kafka - Installation in Windows

Download and install the required software (Java, Zookeeper, and Kafka).

  1. Install JDK (Java Development Kit) and configure
    • Download JDK from the following path.
      https://www.oracle.com/java/technologies/javase-jre8-downloads.html
    • Install JDK (.exe file) in your work folder. E.g C:\Java\jre1.8.0_91
    • Set the JAVA_HOME path in Environment variables.

    • Set the Java path in PATH variable.

    • Confirm the java installation by verify ‘java -version’ in command prompt.

  2. Install Zookeeper and configure.
    • Download Zookeeper from the below path and extract to C:\zookeeper-3.7.0. http://zookeeper.apache.org/releases.html
    • Open Zookeeper configuration directory. E.g: C:\Work\Kafka\zookeeper-3.7.0\conf
    • Rename “zoo_sample.cfg” file to “zoo.cfg” file
    • Edit zoo.cfg file and configure dataDir path. dataDir = C:\Work\Kafka\zookeeper-3.7.0\data
    • Add ZOOKEEPER_HOME = C:\Work\Kafka\zookeeper-3.7.0 in Environment variables.
    • Edit and update the PATH variable value by adding
      ; %ZOOKEEPER_HOME%\bin;
    • Start zookeeper by running zkserver.cmd. The zookeeper would run on default port 2181.

  3. Setup Kafka Single Node and configure.
    • Download Kafka software from the below path.
      http://kafka.apache.org/downloads.html
    • Extract kafka_2.12-2.8.0.tgz file to C:\Work\Kafka\kafka_2.12-2.8.0.
    • Go to C:\Work\Kafka\kafka_2.12-2.8.0 directory and starts Kafka server by executing the following command in prompt.
      .\bin\windows\kafka-server-start.bat .\config\server.properties
      Note: Make sure zookeeper server is running.


      The Kafka server installed and configured now. You can practice Kafka basic operations like creatiing topic, deleting topics.
Tutorial #1: Kafka - Introduction
Tutorial #4: Kafka - Use Cases
Tutorial #5: Kafka - Clients
Tutorial #6: Kafka - Installation in Windows (current page)