[kafka] simply install kafka stand-alone version
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