修改server.properties
listeners=PLAINTEXT://192.168.174.128:9092
1.启动zookeeper:
./bin/zookeeper-server-start.sh ./config/zookeeper.properties
2.启动kafka
./bin/kafka-server-start.sh ./config/server.properties
创建一个名为test的topic,只有一个副本,一个分区
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
查看创建的topic
bin/kafka-topics.sh -list -zookeeper localhost:2181
启动producer并发送消息启动producer
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
启动consume
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
cd /apps/kafka-manager-2.0.0.2
启动kafka-manager
nohup bin/kafka-manager -Dconfig.file=conf/application.conf -Dhttp.port=8080 &