Skip to content

Instantly share code, notes, and snippets.

@primayudantra
Forked from jarrad/install-kafka.txt
Last active July 16, 2018 08:01
Show Gist options
  • Save primayudantra/00269b8ec1e9ee38e31e7943303bc27d to your computer and use it in GitHub Desktop.
Save primayudantra/00269b8ec1e9ee38e31e7943303bc27d to your computer and use it in GitHub Desktop.
Install Kafka on OSX via Homebrew
$> brew cask install java
$> brew install kafka
$> vim ~/bin/kafka
# ~/bin/kafka
#!/bin/bash
zkServer start
kafka-server-start.sh /usr/local/etc/kafka/server.properties
$> chmod +x ~/bin/kafka
------------------------------------------------------------------------------------------------------
# another solution
------------------------------------------------------------------------------------------------------
Homebrew has a services manager and can manage its own Java installation, so an easier way to do this is just
# this will install java 1.8, zookeeper, and kafka
> brew install kafka
# this will run ZK and kafka as services
> brew services start zookeeper
> brew services start kafka
That's it. If you want to stop Kafka, just run the brew services commands in reverse:
> brew services stop kafka
> brew services stop zookeeper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment