kafka集群安装

1. 用独立zk集群

  1. 安装zk集群
  2. 安装kafka

2. 用kafka再带zk安装集群

为了跟业务的zk区分开,kafka的zk单独安装集群

  1. 修改zk配置文件
cd /data/kafka/kafka_2.13-2.4.0/config
vim zookeeper.properties
dataDir=/data/kafka/zoo/dataDir
# the port at which the clients will connect
initLimit=10
# disable the per-ip limit on the number of connections since this is a non-production config
syncLimit=5

maxClientCnxns=0
# Disable the adminserver by default to avoid port conflicts.
# Set the port to something non-conflicting if choosing to enable this
admin.enableServer=false
# admin.serverPort=8080
clientPort=2186
server.1=10.51.0.28:3121:3122
server.2=10.51.0.29:3123:3124
server.3=10.51.0.30:3125:3126
  1. 修改kafka配置文件
vim server.properties
zookeeper.connect=10.51.0.28:2186,10.51.0.29:2187,10.51.0.30:2188
  1. 启动服务
# 先启动zk集群
./zookeeper-server-start.sh  -daemon ../config/zookeeper.properties
# 再启动kafka节点
./kafka-server-start.sh -daemon ../config/server.properties
# kafka   mq   集群  

评论

企鹅群:39438021

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×