Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[kafka] simply install kafka stand-alone version

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

1. Install kafka

Download address: https://www.apache.org/dyn/closer.cgi?path=/kafka/0.9.0.0/kafka_2.11-0.9.0.0.tgz

Rztar zxf kafka_2.11-0.9.0.0.tgzmv kafka_2.11-0.9.0.0 / usr/local/kafka

two。 Start and stop

/ usr/local/kafka/bin/kafka-server-stop.sh / usr/local/kafka/config/server.properties/usr/local/kafka/bin/kafka-server-start.sh / usr/local/kafka/config/server.properties & jps2695 QuorumPeerMain # ZooKeeper daemon 6268 Kafka # Kafka daemon 6553 Jps

3. The above is the "single node-single agent" configuration

4. Simply modify the configuration

Cd / usr/local/kafkavim config/server.properties-advertised.host.name=10.1.44.187-

5. Create and delete topic

# create topicbin/kafka-topics.sh-- create-- zookeeper localhost:2181-- replication-factor 1-- partitions 1-- topic HelloWorld# delete bin/kafka-topics.sh-- delete-- zookeeper localhost:2181-- topic HelloWorld# to view the existing topicbin/kafka-topics.sh-- list-- zookeeper localhost:2181

6. Open 2 windows for production and consumption testing

# production / usr/local/kafka/bin/kafka-console-producer.sh-- broker-list 10.1.44.187-topic HelloWorld# consumption / usr/local/kafka/bin/kafka-console-consumer.sh-- zookeeper 10.1.44.187-- topic HelloWorld-- from-beginning

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report