[ZooKeeper_kafka] ZooKeeper and Kafka installation

1. wget https://mirrors.cnnic.cn/apache/zookeeper/stable/zookeeper-3.4.12.tar.gz

tar -zxvf zookeeper-3.4.12. tar.gz Unzip

2. cd zookeeper-3.4.12

cp -rf conf/zoo_sample.cfg conf /zoo.cfg

vim conf/zoo.cfg

   modify the snapshot storage address

3. sh bin/zkServer.sh start Start zookeeper

4. Start kafka

sh bin/kafka-server-start.sh config/server .properties

5. Create topic

sh bin/kafka-topics.sh –create –topic testTopic –replication-factor 1 –partitions 1 –zookeeper localhost: 2181

6. List topics

sh bin/kafka-topics.sh –list –zookeeper localhost:2181

7. List topics under

bin/kafka-console-consumer.sh –zookeeper localhost:2181 –topic testTopic –from-beginning

7. Production Message Producer

Leave a Comment

Your email address will not be published.