赞
踩
cd opt
tar -zxvf kafka_2.12-3.6.0.tgz
###### 2. 配置kafka
在kafka解压目录同一路径下创建
mkdir -p /opt/software/kafka
mkdir -p /opt/software/kafka/zookeeper #zookeeper数据目录
mkdir -p /opt/software/kafka/log #kafka日志
mkdir -p /opt/software/kafka/zookeeper/log #zookeeper日志
###### 3 进入配置文件目录
cd /opt/kafka_2.12-3.6.0/config/
###### 4 修改配置文件server.properties,添加下面内容
broker.id=0
port=9092 #端口号
host.name=localhost #服务器IP地址,修改为自己的服务器IP
log.dirs=/opt/software/kafka/log #日志存放路径,上面创建的目录
zookeeper.connect=localhost:2181 #zookeeper地址和端口,单机配置部署,localhost:2181
###### 5 配置zookeeper服务 zookeeper.properties
dataDir=/opt/software/kafka/zookeeper #zookeeper数据目录
dataLogDir=/opt/software/kafka/zookeeper/log #zookeeper日志目录
clientPort=2181
max
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。