How to install Kafka on Windows?

前端 未结 11 1891
無奈伤痛
無奈伤痛 2020-12-02 09:27

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

11条回答
  •  粉色の甜心
    2020-12-02 10:01

    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 \bin\kafka-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..

提交回复
热议问题