1、上传kafka_2.12-2.7.0.tgz ,解压修改相关配置
tar -zxvf kafka_2.12-2.7.0.tgz
cd kafka_2.12-2.7.0/
cd config/
cp server.properties server.properties.src
vim server.properties
2、编辑启动脚本
cd /opt/kafka_2.12-2.7.0/
touch run.sh
chmod +x run.sh
vim run.sh
#!/bin/bash
KPATH=/opt/kafka_2.12-2.7.0
nohup $KPATH/bin/zookeeper-server-start.sh $KPATH/config/zookeeper.properties 2>&1 > $KPATH/zk.log &
nohup $KPATH/bin/kafka-server-start.sh $KPATH/config/server.properties 2>&1 > $KPATH/kafka.log &
./run.sh
ps -ef | grep kafka