Installation
Verify Java Version
You must have java version 8 on your machine. You can verify this using.
If java is successfully installed on your machine, you could see the version of the installed Java.
If Java is not available, please download the latest version of JDK for your operating system.
ZooKeeper Installation
Download ZooKeeper
Zookeeper is included with Kafka download
Extract tar file
Extract tar file using the following command
Update Configuration File
Open Configuration File named conf/zoo.cfg using the command vi “conf/zoo.cfg” and all the following parameters to set as starting point.
Once the configuration file has been saved successfully and return to terminal again, you can start the zookeeper server.
Start ZooKeeper Server
After executing this command, you will see output similar to the one shown below−
Start Zookeeper CLI
After typing the above command, you will be connected to the zookeeper server and will get the below response.
Stop Zookeeper Server
After connecting the server and performing all the operations, you can stop the zookeeper server with the following command −
Apache Kafka Installation
Let us continue with the following steps to install Kafka on your machine.
Download Kafka
To install Kafka, download a compatible binary version.
In this document, we are working with the 1.1.1 version – kafka_2.11_1.1.1.tgz
Extract the tar file
Extract the tar file using the following command −
Now you have downloaded the latest version of Kafka on your machine.
Start Kafka Server
Start the zookeeper server as shown earlier. Next start the Kafka server using
Once the server starts, you will see output similar to shown below
Stop Kafka Server
After performing all the operations, you can stop the server using the following command −
This completes Kafka Server installation from the tar.
Last updated