本文介绍搭建kafka集群,采用两台机器
好了,直接开始了:
1、下载zookeeper、kafka(zookeeper-3.4.10.tar.gz、kafka_2.8.0-0.8.0-beta1.tgz)
2、部署zookeeper集群(参考:https://blog.csdn.net/kxkkl/article/details/79964275)
3、部署kafka,解压后修改配置:kafka_2.8.0-0.8.0-beta1/config/server.properties
broker.id=101
host.name=192.168.110.48
zookeeper.connect=192.168.30.126:2181,192.168.30.127:2181,192.168.30.128:2181
另一台机器同样操作,配置修改如下:
broker.id=102
host.name=192.168.110.49
zookeeper.connect=192.168.30.126:2181,192.168.30.127:2181,192.168.30.128:2181
4、执行如下命令启动两台机器kafka
bin/kafka-server-start.sh config/server.properties &