KAFKA配置


1、安装环境准备
1)系统:centos 6.5 64位,Ext4
2)安装包列表:
Kafka:192.168.137.11/卷皮网/软件包目录/kafka/kafka_2.11-0.9.0.0.tar.gz
zookeeper:软件件包和安装请看zk安装手册。
3)机器要求
基本配置:
32GB of memory / 7200 rpm SATA drives
推荐配置: 64GB of memory / SAS
2、软件安装步骤(需要提供软件启动脚本)
安装目录:/usr/data/xxx
启动脚本:nohup ./bin/kafka-server-start.sh config/server.properties &
3、配置文件说明(关键配置需要给出说明)
配置文件在 config/server.properties 注:broker.id 和 host.name 每个节点都不一样
# The id of the broker. This must be set to a unique integer for each broker.
# 群集中节点的唯一标识,一般0为开始,新一个节点加1(如broker.id=1,broker.id=2 )
broker.id=0
############################# Socket Server Settings #############################
# 一般配置成本地IP
listeners=PLAINTEXT://192.168.143.4:9092
# Hostname the broker will bind to. If not set, the server will bind to all interfaces
# 默认会从/etc/hosts取,一般配置成本地IP
host.name=192.168.143.4

############################# Log Basics #############################
# A comma seperated list of directories under which to store log files
# kakfa数据储存目录,这是应用日志目录,是数据目录
log.dirs=/data/kafka-logs
# The default number of log partitions per topic. More partitions allow greater
# parallelism for consumption, but this will also result in more files across
# the brokers.
# 分区数据,测试和压测环境等可以配置3,线上需要做容量规划。
num.partitions=3

# Zookeeper connection string (see zookeeper docs for details).
# This is a comma separated host:port pairs, each corresponding to a zk
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
# You can also append an optional chroot string to the urls to specify the
# root directory for all kafka zones.
# zk集群ip
zookeeper.connect=192.168.143.2:2181,192.168.143.3:2181,192.168.144.2:2181

4、检验方法(检验是否按照成功) 在kafka目录执行:
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 3 --partitions 3 --topic test
替换命令的zk地址

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值