Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
63 views
in Technique[技术] by (71.8m points)

How to install Kafka on Windows?

I'm trying to install Kafka message queue on Windows for testing purposes (not for production).

I found this article on how to install Apache Kafka 0.8 on Windows: http://janschulte.wordpress.com/2013/10/13/apache-kafka-0-8-on-windows/

It's a good article, but it's outdated, unfortunately.

Does someone know a way to achieve that?

question from:https://stackoverflow.com/questions/23115013/how-to-install-kafka-on-windows

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Ok, it's finally not complicated :)

The only steps are:

  1. Download Kafka and uncompress it somewhere nice (let's say C:/Kafka)
  2. Install Cygwin
  3. Edit inkafka-run-class.sh and at the end of the file, change

    exec $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@"

    to

    exec java $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp `cygpath -wp $CLASSPATH` $KAFKA_OPTS "$@"

  4. In Environment Variables, Add java to your Path System Variable:

    enter image description here

That's it.. you can now run ZooKeeper and Kafka servers and start playing with topics and stuff..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...