kafka 安装


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


 

posted @ 2015-01-26 15:03  Daem0n  阅读(696)  评论(0编辑  收藏  举报