centos7下面安装kafka服务,用于自己测试
1.安装JAVA环境
yum -y install java-1.8.0-openjdk
2.下载代码
curl -o kafka_2.13-3.6.1.tgz https://downloads.apache.org/kafka/3.6.1/kafka_2.13-3.6.1.tgz
3.更改配置运行
tar -xf kafka_2.13-3.6.1.tgz cd kafka_2.13-3.6.1 sed -i 's/broker.id=0/broker.id=1/g' config/server.properties ip=$(hostname -I | awk '{print $1}') sed -i "s|#listeners=PLAINTEXT://:9092|#listeners=PLAINTEXT://$ip:9092|g" config/server.properties bin/zookeeper-server-start.sh -daemon config/zookeeper.properties bin/kafka-server-start.sh config/server.properties
4.创建topic
bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic demo001
标签:3.6,部署,server,centos7,--,kafka,2.13,properties From: https://www.cnblogs.com/yuandaozhe/p/17984313