Prerequisites – Java JDK
Although Kafka is written in Scala, you do not need to install it. Only Java JDK is required.
Download Java JDK:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Install it and make sure you update the PATH environment variable according to instructions:
http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html
Get the source
Do either the Clone-and-Checkout step or the Download step:
- Clone-and-Checkout
Execute:git clone http://git-wip-us.apache.org/repos/asf/kafka.git kafka cd kafka git checkout -b 0.8 remotes/origin/0.8
- Download
Download from https://github.com/apache/kafka ("Download Zip" button) and unpack to the folder kafka. Execute:cd kafka
Build
Execute:
.\sbt.bat update .\sbt.bat package .\sbt.bat assembly-package-dependency
Update the bat files
Unfortunately the bat files for Kafka 0.8.0 are full of errors, so in order to start Zookeeper and Kafka they must be replaced. See Step 1, Update the bat files.
Update config for Windows
Update the config files according to Step 1, Update Config.
Run
To run, see Step 2, Start the server.
See Running Kafka 0.8.0 on Windows for more info on how to set up and run Kafka using the binary distribution.
Nice walkthrough Håkan!
ReplyDeleteSince I'm sitting behind proxy I had to change sbt.bat with:
java -Dhttp.proxyHost=proxy_ip -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy_ip -Dhttps.proxyPort=8080 ...