操作系统:linux
(一)安装JDK yum install -y java-1.8.0-openjdk.x86_64
(二)安装wget yum install wget
(三)1.安装kafka wget https://mirror.bit.edu.cn/apache/kafka/2.6.0/kafka_2.13-2.6.0.tgz(注意不要安装带src的,运行报错Classpath is empty. Please build the project first e.g. by running './gradlew jar -PscalaVersion=2.13.2')
2.解压 tar -xzf kafka_2.13-2.6.0.tgz
3.进入bin目录,可以看到很多脚本文件
4.运行zookeeper和kafka,在bin那层去运行,不知道为啥进到bin之后,不能自动补全
5.运行zookeeper, bin/zookeeper-server-start.sh config/zookeeper.properties
6.运行kafka,bin/kafka-server-start.sh config/server.properties