官网地址: http://kafka.apache.org/downloads.html
这里选择的是kafka_2.12-3.6.0.tgz
mkdir -p /usr/local/kafka/kafka_2.12-3.6.0
tar -zxvf kafka_2.12-3.6.0.tgz -C /usr/local/kafka/ -C /usr/local/kafka/
sh /usr/local/kafka/kafka_2.12-3.6.0/bin/kafka-storage.sh random-uuid
[root@localhost bin]# sh /usr/local/kafka/kafka_2.12-3.6.0/bin/kafka-storage.sh random-uuid
C4mOgAy4TouDNwkz_35D0A
[root@localhost bin]#
sh /usr/local/kafka/kafka_2.12-3.6.0/bin/kafka-storage.sh format -t C4mOgAy4TouDNwkz_35D0A -c /usr/local/kafka/kafka_2.12-3.6.0/config/kraft/server.properties
[root@localhost kraft]# sh /usr/local/kafka/kafka_2.12-3.6.0/bin/kafka-storage.sh format -t C4mOgAy4TouDNwkz_35D0A -c /usr/local/kafka/kafka_2.12-3.6.0/config/kraft/server.properties
Formatting /tmp/kraft-combined-logs with metadata.version 3.6-IV2.
[root@localhost kraft]#
sh /usr/local/kafka/kafka_2.12-3.6.0/bin/kafka-server-start.sh -daemon /usr/local/kafka/kafka_2.12-3.6.0/config/kraft/server.properties &
tail -f /usr/local/kafka/kafka_2.12-3.6.0/logs/server.log
sh /usr/local/kafka/kafka_2.12-3.6.0/bin/kafka-server-stop.sh