CentOS7上kafka集群配置

 时间:2024-10-25 19:45:44

1、修改三台机上的/etc/hosts文件,使集群之前通过主机名可通信

CentOS7上kafka集群配置

2、编辑zookeeper配置文件,在后面添加集群信息(三台都要修改)vi /usr/share/kafka/config/zookeeper.properties

CentOS7上kafka集群配置

3、在/tmp下创建zookeeper目录,并执行如下命令mytest01上:echo 1 >/tmp/zookeeper/myidmytest02上:echo 2 >/tmp/zookeeper/myidmytest03上:echo 3 >/tmp/zookeeper/myid

CentOS7上kafka集群配置

4、启动zookeepernohup /usr/share/kafka/bin/zookeeper-server-start.sh /usr/share/kafka/config/zookeeper.properties 2>1 &

CentOS7上kafka集群配置

5、修改kafka配置文件vi /usr/share/kafka/config/server.properties其中broker.id三台要不一样,依次设置为0、1、2

CentOS7上kafka集群配置CentOS7上kafka集群配置

6、启动kafkanohup /usr/share/kafka/bin/kafka-server-start.sh /usr/share/kafka/config/server.properties 2>1&查看端口

CentOS7上kafka集群配置
  • centos7上cntlm如何配置
  • Windows 安装 VirtualBox + CentOS7
  • CentOS7 安装GUI界面
  • kafka自动创建topic如何设置
  • 热门搜索
    8月5日是什么星座 国士无双什么意思 称赞的近义词是什么 10月13日是什么星座 银杏树叶子像什么 ok镜是什么 1967年属什么 农历七月十四是什么节日 4月3日是什么星座 宫高是什么意思