Skip to content

安装

单机安装

bash
# @see https://hub.docker.com/r/apache/kafka
docker run -d --name kafka-server --hostname kafka-server \
    -p 9092:9092 \
    apache/kafka:3.7.0
# 进入容器
docker exec -it [容器ID] /bin/bash
# 命令工具 所有命令sh都在这里
cd opt/kafka/bin/
bash
# 运行环境 安装Java8+ @see https://www.oracle.com/java/technologies/downloads/
# 先下载kafka @see https://kafka.apache.org/downloads
# 解压
tar -xzf kafka_2.13-3.7.0.tgz
cd kafka_2.13-3.7.0