惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
GRAHAM CLULEY
T
Tenable Blog
Know Your Adversary
Know Your Adversary
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
S
Security Affairs
NISL@THU
NISL@THU
O
OpenAI News
Attack and Defense Labs
Attack and Defense Labs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Schneier on Security
Schneier on Security
S
SegmentFault 最新的问题
S
Schneier on Security
G
Google Developers Blog
V
V2EX
C
Check Point Blog
U
Unit 42
Google DeepMind News
Google DeepMind News
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
T
The Exploit Database - CXSecurity.com
Recent Announcements
Recent Announcements
M
MIT News - Artificial intelligence
S
Secure Thoughts
博客园 - 司徒正美
Recorded Future
Recorded Future
P
Proofpoint News Feed
Spread Privacy
Spread Privacy
K
Kaspersky official blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
AI
AI
博客园 - 聂微东
N
News and Events Feed by Topic
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
Project Zero
Project Zero
W
WeLiveSecurity
博客园 - Franky

博客园 - 不懂123

kafka添加用户管理认证 nodejs升级管理 elastic定时清除索引数据 sftp集成设置 nginx扩展编译模块 rancher kafka部署 JumpServer使用示例 rancher kafka多监听配置 jenkins远程动态打包镜像 docker镜像仓库清理迁移 elastic单机多节点集群搭建 fastdfs编译升降版本 监控系统搭建集成实例 rancher服务启动异常 linux使用ssh免密连接windows主机 jenkins pipeline搭建 docker跨平台构建镜像 fastdfs系统异常 mongodb集群用户管理
kafka3.9集群部署
不懂123 · 2026-03-23 · via 博客园 - 不懂123

初始化集群

       uuid只要在一台机器上执行即可,其他主机复制uuid的值即可
       uuid=bin/kafka-storage.sh random-uuid
       echo $uuid

     每台主机上执行以上命令
       bin/kafka-storage.sh format -t $(uuid) -c config/kraft/server.properties

       bin/kafka-server-start.sh --daemon config/kraft/server.properties

       jdk要17以上

配置文件修改

cat /config/kraft/server.properties
process.roles=broker,controller
node.id=1
controller.quorum.voters=1@43.68.1.60:9093,2@43.68.1.61:9093,3@43.68.1.62:9093
listeners=PLAINTEXT://:9092,CONTROLLER://:9093
advertised.listeners=PLAINTEXT://43.68.1.60:9092
inter.broker.listener.name=PLAINTEXT
controller.listener.names=CONTROLLER
listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
log.dirs=/app/kafka/logs
offsets.topic.replication.factor=3
transaction.state.log.replication.factor=3
auto.create.topics.enable=true
log.retention.hours=6
message.max.bytes=6291457
num.partitions=4

View Code

注册服务

[Unit]
Description=kafka
Wants=network-online.target

[Service]
Type=simple
User=root
Group=root

WorkingDirectory=/app/bitnami/kafka
ExecStart=/app/bitnami/kafka/bin/kafka-server-start.sh /app/bitnami/kafka/config/kraft/server.properties


KillSignal=SIGTERM
TimeoutStopSec=30
SendSIGKILL=no
SuccessExitStatus=143

kafka.service

每个node启动间隔不要太大