配置kafka集群

1.安装JDK
yum install -y jdk-8u201-linux-x64.rpm
2.配置kafka
tar -zxvf kafka_2.12-2.1.1.tgz
vi config/server.properties
设置:
broker.id=1
zookeeper.connect=node1:2181,node2:2181,node3:2181
3.启动kafka
./kafka-server-start.sh -daemon ../config/server.properties
4.验证
登录zookeeper
./zkCli.sh -server kafka1:2181
[zk: node2:2181(CONNECTED) 7] ls /brokers/ids
[1, 2, 3]