Kafka
- Kafka依赖于Zookkeeper
- 两个都依赖于Java
Kafka依赖于Zookeeper
- 官方网站:https://zookeeper.apache.org/
- 下载ZK的二进制包
- 解压到对应目录完成安装
ZK的安装命令
- tar -zxf zookeeper-3.4.13.tar.gz
- mv zookeeper-3.4.13 /usr/local/
- cp /usr/local/zookeeper-3.4.13/conf/zoo_sample.cfg /usr/local/zookeeper-3.4.13/conf/zoo.cfg
ZK的启动
- 更改配置:clientPortAddress=0.0.0.0
- 启动:/usr/local/zookeeper-3.4.13/bin/zkServer.sh start
Kafka下载地址
- Kafka官网:http://kafka.apache.org/
- 下载Kafka的二进制包
- 解压到对应目录完成安装
Kafka的安装命令
- cd /usr/local/src/
- tar -zxf kafka_2.11-2.1.1.tgz
- mv kafka_2.11-2.1.1 /usr/local/kafka_2.11
Kafka的启动
- 更改kafka的配置:更改监听地址、更改连接zk的地址
- 前台启动:/usr/local/kafka_2.11/bin/kafka-server-start.sh /usr/local/kafka_2.11/config/server.properties
- 启动kafka:nohup /usr/local/kafka_2.11/bin/kafka-server-start.sh /usr/local/kafka_2.11/config/server.properties >/tmp/kafka.log 2>&1 &