Installing Kafka on Mac
![](https://igreendata.com.au/wp-content/uploads/2021/09/apache-kafka.jpg)
Installation:
http://kafka.apache.org/
To download Kafka, navigate to kafka.apache.org and click on Download button
![](https://igreendata.com.au/wp-content/uploads/2021/09/11-4.png)
Please select the version you want to download ( here I have selected version 2.8.0 ) and choose the Scala version as Scala 2.13 to download the tgz file : https://apache.mirror.digitalpacific.com.au/kafka/2.8.0/kafka_2.13-2.8.0.tgz
![](https://igreendata.com.au/wp-content/uploads/2021/09/12-3.png)
Copy the tar file to desired location and unzip it
![](https://igreendata.com.au/wp-content/uploads/2021/09/13-1.png)
Configuration
The directory structure of Kafka would look like below
![](https://igreendata.com.au/wp-content/uploads/2021/09/14-1.png)
Modify config/server.properties
Using nano editor : nano config/server.properties need to set below properties
Startup:
bin/kafka-server-start.sh config/server.properties
broker.id=0
listeners=PLAINTEXT://127.0.0.1:9092
zookeeper.connect=127.0.0.1:2181
Start the zookeeper by running the command
bin/zookeeper-server-start.sh config/zookeeper.properties
Now if the log looks good ( without error ) , we can able to create topic and list it out
Topic Creation
To create topic, please run the below command
bin/kafka-topics.sh — bootstrap-server 127.0.0.1:9092 — create — topic demo_topic
![](https://igreendata.com.au/wp-content/uploads/2021/09/15-1.png)
To view the list of topics, run below command
bin/kafka-topics.sh — bootstrap-server 127.0.0.1:9092 — list [ its actually double hypen list ]
![](https://miro.medium.com/max/875/1*3xg6FWpO_uLpJ78UzjywPQ.png)
Happy Learning !
Bharathy Poovalingam
#Kafka #Learning #iGreenData