Install Kafka with Zookeeper on Mac OS
Step 1 Check Install Java JDK version 17 (or other)
https://kafka.apache.org/downloads under 'Binary Downloads'
Step 2 Download Apache Kafka fromStep 3 Extract the contents on your Mac
Extract the contents (double click in the Finder) to a directory of your choice,
for example /opt/homebrew/Cellar/kafka_2.13-3.3.1
Step 4 Create in the folder kafka_2.13-3.3.1/data two folders: kafka and zookeper.
Step 5 Editing files zookeeper.properties and server.properties
~/kafka_2.13-3.3.1/config/server.properties
- Find log.dirs and paste our temporary path instead
log.dirs=/opt/homebrew/Cellar/kafka_2.13-3.3.1/data/kafka
~/kafka_2.13-3.3.1/config/zookeeper.properties
- Find dataDir and paste our temporary path instead
dataDir=/opt/homebrew/Cellar/kafka_2.13-3.3.1/data/zookeper
Step 6 Start Zookeeper using the binaries
From the root folder of Apache Kafka, you can run ZooKeeper by executing the following command:
Step 7 Start Kafka using the binaries in another process
Now, open a new terminal window & run the following command from the root of Apache Kafka to start the Kafka environment:
-bin/kafka-server-start.sh config/server.properties
Kafka running