主机环境与依赖
操作系统:centos7
CPU架构:x86_64
软件依赖:jdk1.8以及zookeeper3.6.3
kafka下载与解压
mkdir /data && cd /data
wget https://dlcdn.apache.org/kafka/2.8.0/kafka_2.12-2.8.0.tgz
tar zxvf kafka_2.12-2.8.0.tgz
ln -s kafka_2.12-2.8.0 kafka
配置文件修改
cp server.properties server.properties.bak
vim server.properties
log.dirs=/data/kafka/kafka-logs
zookeeper.connect=hadoop1:2181
mkdir /data/kafka/kafka-logs
kafka启动
cd /data/kafka && bin/kafka-server-start.sh -daemon config/server.properties
kafka停止
cd /data/kafka && bin/kafka-server-stop.sh -daemon config/server.properties
|