Skip to content

Instantly share code, notes, and snippets.

@mayankcpdixit
Last active April 19, 2022 02:25
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mayankcpdixit/105d4b15ead728f9d9cacb9af051de48 to your computer and use it in GitHub Desktop.
Save mayankcpdixit/105d4b15ead728f9d9cacb9af051de48 to your computer and use it in GitHub Desktop.
Install Kafka in local (mac)

Install kafka in your local mac machine

run following commands:

brew install kafka
sudo mkdir -p /usr/local/var/run/zookeeper/data
sudo chmod 777 /usr/local/var/run/zookeeper/data
zkServer start

mkdir -p /usr/local/var/lib/kafka-logs
sudo chmod 777 /usr/local/var/lib/kafka-logs
/usr/local/Cellar/kafka/2.1.0/libexec/bin/kafka-server-start.sh /usr/local/etc/kafka/server.properties

Uncomment:

listeners=PLAINTEXT://localhost:9092
advertised.listeners=PLAINTEXT://localhost:9092

in your /usr/local/etc/kafka/server.properties.

PS: if it's not present in /usr/local/Cellar/kafka/2.1.0/libexec/bin/kafka-server-start.sh then try running /usr/local/bin/kafka-server-start it'll give the path. keywords: Install Kafka on OSX via Homebrew,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment