# 解压缩Kafka压缩包
tar -xzf kafka_2.13-2.4.1.tgz
cd kafka_2.13-2.4.1
# 启动ZooKeeper服务
bin/zookeeper-server-start.sh config/zookeeper.properties
# 启动Kafka服务
bin/kafka-server-start.sh config/server.properties
# ps如果需要IP访问需要修改server.properties,默认是主机名访问:#advertised.listeners=PLAINTEXT://your.host.name:9092,放开注释,修改如下
advertised.listeners=PLAINTEXT://192.168.3.101:9092