In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to configure kafa stand-alone docker". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to configure kafa stand-alone docker".
1. Start zookeeper
Sudo docker run-d-- name zookeeper-- publish 2181
-- volume / etc/localtime:/etc/localtime\
-- volume / data/zookeeper/data:/data\
-- volume / data/zookeeper/datalog:/datalog\
-- volume / data/zookeeper/logs:/logs\
-- restart always\ # when Docker is restarted, the container restarts automatically
Zookeeper:3.5.8
2. Start kafka
Sudo docker run-d-- name kafka-- publish 9092
-- link zookeeper\
-- env KAFKA_BROKER_ID=0\
-- env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181\
-- env KAFKA_ADVERTISED_HOST_NAME= public IP\
-- env KAFKA_ADVERTISED_PORT=9092\
-- env KAFKA_LISTENERS= PLAINTEXT://0.0.0.0:9092\
-- env KAFKA_AUTO_CREATE_TOPICS_ENABLE=false\
-- env KAFKA_LOG_DIRS=/kafka\
-- volume / etc/localtime:/etc/localtime\ # Container time zone is the same as host
-volume / data/kafka:/kafka\ #
Wurstmeister/kafka:2.12-2.4.1
3. Create a theme
Bin/kafka-topics.sh-create-zookeeper zookeeper:2181-replication-factor 1-partitions 1-topic mytest
4. Production data
Bin/kafka-console-producer.sh-broker-list localhost:9092-topic mytest
Note: the CVM must open the response port, such as 2181, 9092, etc.
At this point, I believe you have a deeper understanding of "how to configure kafa stand-alone docker". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.