一、kafka最新版本下载地址
本博文发表时,kafka的最新版本是1.0.0.下载地址:http://kafka.apache.org/quickstart。同时在这个链接里有英文版的安装和使用。对于单机用户而言,可下载虚拟机,和centos的操作系统,进行模拟。
虚拟机地址:https://www.virtualbox.org/wiki/Downloads
centos 镜像地址:http://isoredirect.centos.org/centos/7/isos/x86_64/
以下记录都是在centos7上进行的安装和测试实例。
二、安装和测试
kafka是基于zookeeper的,所以先安装zookeeper
1、下载并安装zookeeper
curl -O http://mirrors.hust.edu.cn/apache/zookeeper/stable/zookeeper-3.4.10.tar.gz
tar -xzf zookeeper-3.4.10.tar.gz
启动zookeeper(注意zookeeper依赖jdk,需先安装jdk)
bin/zkServer.sh start &
1、下载
curl -O http://mirror.bit.edu.cn/apache/kafka/1.0.0/kafka_2.12-1.0.0.tgz
2、解压
tar -xzf kafka_2.12-1.0.0.tgz
cd kafka_2.12-1.0.0
3、启动 服务
bin/kafka-server-start.sh config/server.properties &
至此,kafka已经启动了,那么感受下kafka的效果