172.19.132.161:zookeeper-3.4.10 kafka_2.12-1.0.1
172.19.132.164:zookeeper-3.4.10 kafka_2.12-1.0.1
172.19.132.167:zookeeper-3.4.10 kafka_2.12-1.0.1
配置文件
每个机器的broker.id分别是123
port=9092
host.name=172.19.132.161
log.dirs=/opt/kafka_2.12-1.0.1/kafka-logs/
num.partitions=3 分区数,因为我这里是三台机器集群所以设置为3
zookeeper的集群
zookeeper.connect=172.19.132.161:2181,172.19.132.164:2181,172.19.132.167:2181
启动:
先启动
zookeeper
三台机器都同样的操作
[root@bogon bin]# /opt/zookeeper-3.4.10/zookeeper-3.4.10/bin/zkServer.sh start
/opt/zookeeper-3.4.10/zookeeper-3.4.10/bin/zkServer.sh status