Centos安装kafka方法

 时间:2026-02-14 20:51:58

1、选择kafka最新版本kafka_2.11-1.0.0.tgz,后面的数字1.0.0才是版本号

Centos安装kafka方法

2、获取kafka的安装包

Centos安装kafka方法

3、解压安装文件并进入kafka所在目录

Centos安装kafka方法

4、进入config目录将server.properties文件置空方便编辑

Centos安装kafka方法

5、编辑配置文件server.properties加入以下内容

broker.id=0  

port=9092

host.name=192.168.1.149

num.network.threads=3 

num.io.threads=8 

log.dirs=/opt/kafka/kafkalogs/ 

socket.receive.buffer.bytes=102400 

num.partitions=1 

log.retention.hours=168 

message.max.byte=5242880  

default.replication.factor=2  

replica.fetch.max.bytes=5242880 

log.retention.check.interval.ms=300000 

log.cleaner.enable=false 

zookeeper.connect=192.168.10.156:2181

Centos安装kafka方法

6、进入bin目录启动kafka

[root@localhost config]# cd ../bin/

[root@localhost bin]# ./kafka-server-start.sh -daemon ../config/server.properties

[root@localhost bin]# 

Centos安装kafka方法

  • CentOS 7上安装kafka教程
  • Centos安装golang方法
  • centos安装pip方法
  • Centos安装varnish方法
  • centos安装grafana方法
  • 热门搜索
    大于号和小于号怎么区分 为什么尿不尽 人类一败涂地怎么爬墙 马桶坑距怎么测量 驴肉火锅的做法大全 英语怎么说 虾米怎么做好吃 为什么经常放屁 苹果为什么会变色 十万个为什么儿童版