Install Apache Kafka on macOS

In this tutorial, I will show you how to install Apache Kafka in macOS!

First, you need to go to Apache Kafka’s Download page to download its latest version! Please download the latest binary version.

After the download is complete, please unzip this download file.

To be able to use Apache Kafka anywhere on my machine, I will edit the .bash_profile file to add the path to Kafka’s bin directory as follows:

For our changes to take effect immediately, you can reload the .bash_profile file with the following command:

To start Apache Kafka, the first thing we need to do is start Apache ZooKeeper.

Please go to the Apache Kafka directory. In this folder there is a config folder:

with the default configuration files of Apache Kafka and also Apache ZooKeeper.

You can start Apache ZooKeeper using the following command:


After you have started Apache ZooKeeper, now you can start Apache Kafka.

Please run the following command:


At this point, we have finished installing Apache Kafka on macOS!

Add Comment