Zookeeper
After decompression into the Conf directory, copy out a zoo.cfg, and then into the bin directory, run directly Zkserver.cmd
Kafka
First you have to have an installation package:
Unzip, directory structure:
Config directory is a config file, do not configure here
In the root directory, enter CMD at the location of the path, and enter to jump out of the command line
First Pit
Input:
. \bin\windows\kafka-server-start.bat. \config\server.properties
Through the Internet access to know, first set clsaapath,so--
set classpath=.
A large pile of it, it succeeded.
The following test: First go to the Windows directory to get the command line, enter the following command
Kafka-topics.bat--create--zookeeper localhost:218111 --topic mytest
A second pit.
Or the old way, first set classpath. Enter the following to view the topic list
Kafka-topics.bat--list--zookeeper localhost:2181
Next, create the producer, enter:
Kafka-console-producer.bat--broker-list localhost:9092 --topic mytest
Next, open a new command line and enter the following
Kafka-console-consumer.bat--bootstrap-server localhost:9092 --topic mytest-from-beginning
now , go back to the producer's command line and enter any content. You can see that when you enter the car, the consumer automatically receives your message
Installing stand-alone Kafka under Windows