标签:
centos 6.5+JDK1.7+zookeeper3.4.6+kafka0.8.1.1
1.安装启动zookeeper
2.下载解压kafka_2.10-0.8.1.1
http://apache.fayea.com/kafka/0.8.1.1/kafka_2.10-0.8.1.1.tgz
3.修改$KAFKA_HOME/bin/server.properties
4.启动kafka
bin/kafka-server-start.sh config/server.properties
5.创建topic,发送消息
bin/kafka-topics.sh --create --zookeeper hadoop:2181 --replication-factor 1 --partitions 1 --topic test
bin/kafka-console-producer.sh --broker-list hadoop:9092 --topic test
6.接收消息
bin/kafka-console-consumer.sh --zookeeper hadoop:2181 --topic test --from-beginning
标签:
原文地址:http://www.cnblogs.com/admln/p/kafka-install.html