9、安装kafka集群
https://www.apache.org/dyn/closer.cgi?path=/kafka/0.10.2.1/kafka_2.12-0.10.2.1.tgz
- 将kafka安装到/usr/local/kafka
tar -xvzf kafka_2.12-0.10.2.1.tgz -C /usr/local
mv /usr/local/kafka_2.12-0.10.2.0 /usr/local/kafka
# kafka
export KAFKA_HOME=/usr/local/kafka
export PATH=$PATH:$KAFKA_HOME/bin
broker.id=0 #整个集群内唯一id号,整数,一般从0开始,每台机器需要单独设置
zookeeper.connect=node1:2181,node2:2181,node3:2181
scp -r /usr/local/kafka/ root@node2:/usr/local/
scp -r /usr/local/kafka/ root@node3:/usr/local/
scp -r /usr/local/kafka/ root@node4:/usr/local/
scp -r /usr/local/kafka/ root@node5:/usr/local/
scp -r /usr/local/kafka/ root@node6:/usr/local/
kafka-server-start.sh -daemon /usr/local/kafka/config/server.properties
[root@node1 config]# ps -ef | grep config/server
root 20313 2132 0 10:14 pts/0 00:00:00 grep --color=auto config/server