搭建一个kafka集群
准备工作
安装好JDK: 点我看过程
安装好zookeeper:点我看过程
kafka安装包:点我领取安装包 :提取码:4hn4
配置信息如下
192.168.197.111 ······································· hadoop01作为主节点 |
---|
192.168.197.112 ······································· hadoop02作为从节点 |
192.168.197.113 ······································· hadoop02作为从节点 |
上传解压包
解压kafka
tar -zxvf /root/tar/kafka_2.11-0.8.2.2.tgz -C /root/myall/kafak/
修改配置文件
cd kafka_2.11-0.8.2.2
cd config
ll
会看到有一个 server.properties文件 ,进行编辑
vim server.properties
修改修改:
broker.id=1
host.name=192.168.197.111
zookeeper.connect=192.168.197.111:2181,192.168.197.112:2181,192.168.197.113:2181
修改