Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

[kafka] simply install kafka stand-alone version

Shulou Source: shulou.com Published: 2022-06-03 06:38:33 11月23日 Update

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

Tags: Process consumption production configuration address node agent test stand-alone stand-alone Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Linux NVidia macOS Docker