Skip to content

Instantly share code, notes, and snippets.

@nrocine
Created January 9, 2014 18:15
Show Gist options
  • Save nrocine/8339122 to your computer and use it in GitHub Desktop.
Save nrocine/8339122 to your computer and use it in GitHub Desktop.
Installation of Kafka on Vagrant Ubuntu Base Box. We may not want to use the ppa:webupd8team/java PPA to install HotSpot JDK. http://kafka.apache.org/documentation.html#quickstart
mkdir ~/kafka
vagrant init metrics http://files.vagrantup.com/precise64.box
vagrant up
vagrant ssh
sudo apt-get update
sudo apt-get install curl
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
curl -O http://repo.scala-sbt.org/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.13.1/sbt.deb
sudo dpkg -i sbt.deb
curl -O http://mirror.sdunix.com/apache/kafka/0.8.0/kafka-0.8.0-src.tgz
tar xvzf kafka-0.8.0-src.tgz
cd kafka-0.8.0-src/
./sbt update
./sbt package
./sbt assembly-package-dependency
nohup bin/zookeeper-server-start.sh config/zookeeper.properties >zookeeper.nohup &
nohup bin/kafka-server-start.sh config/server.properties >kafka-server.nohup &
@nrocine
Copy link
Author

nrocine commented Jan 15, 2014

sudo apt-get install python-software-properties

may need to be

sudo apt-get install software-properties-common

@nrocine
Copy link
Author

nrocine commented Jan 15, 2014

Put a container on it: nrocine/kafka-base
https://registry.hub.docker.com/u/nrocine/kafka-base/

@petervandenabeele
Copy link

The 0.8.0 location does not exist anymore on that server.

This worked for 0.8.1.1 (based on the README):

curl -O http://mirror.sdunix.com/apache/kafka/0.8.1.1/kafka-0.8.1.1-src.tgz
tar -xvzf kafka-0.8.1.1-src.tgz
cd kafka-0.8.1.1-src/
cat README.md
# using gradle now
kafka-0.8.1.1-src$ ./gradlew clean
kafka-0.8.1.1-src$ ./gradlew -PscalaVersion=2.10.4 jar

# fix the filename of the core lib (marked with 2.10 instead of 2.10.4)
kafka-0.8.1.1-src$ cp core/build/libs/kafka_2.10-0.8.1.1.jar core/build/libs/kafka_2.10.4-0.8.1.1.jar

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