Description:
Kafka dependent java environment, need to install and run in cmd jdk java -version java version number of the normal display
1. Download Kafka (version: kafka_2.12-2.3.0):
http://kafka.apache.org /downloads.html
2. after extracting zookeeper modified configuration file: kafka_2.12-2.3.0 \ config \ zookeeper.properties
dataDir = D: \ the Env \ kafka_2.12-2.3.0 \ Data
3. start zookeeper:
. \ bin . \ Windows \-Server-ZooKeeper the start.bat \ config \ zookeeper.properties
4. modify kafka server profile: kafka_2.12-2.3.0 \ config \ the server.properties
log.dirs = D: \ the Env \ kafka_2. 12-2.3.0 \ Kafka-logs
5. the start Kafka:
. \ bin \ Windows \-Server-Kafka the start.bat \ config \ the server.properties.
failed to start: zookeeper cleanable data generated retry
6.consumer producer and client starts
consumer cli: .\bin\windows\kafka-console-consumer.bat --bootstrap-server 127.0.0.1:9092 --topic nginx_log --from-beginning
producer cli: .\bin\windows\kafka-console-producer.bat --broker-list 127.0.0.1:9092 --topic nginx_log
windows configuration kafka environment (dependent zookeeper, kafka built)
Guess you like
Origin www.cnblogs.com/luffy-li/p/11484296.html
Recommended
Ranking