采用的是2m-2s-async模式

1.  修改每台机器的/etc/hosts  文件,增加如下内容

192.168.1.100 nameserver1
192.168.1.102 nameserver2
192.168.1.103 nameserver3
192.168.1.104 nameserver4
192.168.1.100 master1
192.168.1.101 master2
192.168.1.102 slave1
192.168.1.103 slave2

2. 下载bin压缩包: http://mirrors.tuna.tsinghua.edu.cn/apache/rocketmq/4.2.0/rocketmq-all-4.2.0-bin-release.zip

然后解压到某个目录, 比如: /data/rocketmq-4.2.0/

2.1 修改 192.168.1.100(master1)下的文件:/data/rocketmq-4.2.0/conf/2m-2s-async/broker-a.properties

vim /data/rocketmq-4.2.0/conf/2m-2s-async/broker-a.properties

增加如下内容:

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
brokerClusterName=EaglehornCluster
brokerName=broker-a
brokerId=0
namesrvAddr=nameserver1:9876;nameserver2:9876;nameserver3:9876;nameserver4:9876
autoCreateTopicEnable=true
autoCreateSubscriptionGroup=true
listenPort=10911
deleteWhen=04
fileReservedTime=48
brokerRole=ASYNC_MASTER
flushDiskType=ASYNC_FLUSH
storePathRootDir=/data/rocketmq-4.2.0/store
storePathCommitLog=/data/rocketmq-4.2.0/store/commitlog
#消费队列存储路径存储路径
storePathConsumeQueue=/data/rocketmq-4.2.0/store/consumequeue
#消息索引存储路径
storePathIndex=/data/rocketmq-4.2.0/store/index

2.2  修改 192.168.1.101(master2)下的文件:/data/rocketmq-4.2.0/conf/2m-2s-async/broker-b.properties

内容同2.1,只是

brokerName=broker-b

2.3 修改 192.168.1.102(slave1)下的文件:/data/rocketmq-4.2.0/conf/2m-2s-async/broker-a-s.properties

内容同2.1,只是

brokerId=1

2.4 修改 192.168.1.103(slave2)下的文件:/data/rocketmq-4.2.0/conf/2m-2s-async/broker-b-s.properties

内容同2.3,只是

brokerId=1

3. 启动nameserver

登录四台服务器,执行如下启动命令

cd /data/rocketmq-4.2.0/bin

nohup sh mqnamesrv &

4. 启动broker

rocketmq 4.2.0集群配置的更多相关文章

  1. redis5.0集群配置

    介绍 redis自3.0版本以来支持主从模式的集群,可用哨兵监控集群健康状态,但这种方式的集群很不成熟,数据备份需要全量拷贝.在之后的版本才真正支持集群分片. 在redis5.0中去除了以redis- ...

  2. Redis-5.0.0集群配置

    版本:redis-5.0.0 参考:http://redis.io/topics/cluster-tutorial. 集群部署交互式命令行工具:https://github.com/eyjian/re ...

  3. Hadoop2.0.0+CDH4.5.0集群配置

    Hadoop 2.0.0-cdh4.5.0安装:http://blog.csdn.net/u010967382/article/details/18402217 CDH版本下载:http://arch ...

  4. Redis-3.2.0集群配置(redis cluster)

    版本:redis-3.0.5 redis-3.2.0  redis-3.2.9  redis-4.0.11 参考:http://redis.io/topics/cluster-tutorial. 目录 ...

  5. hadoop2.6.0集群配置

    1.修改机器名 集群的搭建最少需要三个节点,机器名分别修改为master,slave1,slave2.其中以master为主要操作系统. 修改hostname: sudo gedit /etc/hos ...

  6. Hadoop-2.6.0 集群的 安装与配置

    1.  配置节点bonnie1 hadoop环境 (1) 下载hadoop- 2.6.0 并解压缩 [root@bonnie1 ~]# wget http://apache.fayea.com/had ...

  7. hadoop集群配置方法---mapreduce应用:xml解析+wordcount详解---yarn配置项解析

    注:以下链接均为近期hadoop集群搭建及mapreduce应用开发查找到的资料.使用hadoop2.6.0,其中hadoop集群配置过程下面的文章都有部分参考. hadoop集群配置方法: ---- ...

  8. rocketMq安装及集群配置

    网上关于rocketMq安装.集群配置的文章有很多,作为一个初学者,跟着网上的各种教程安装遇到了各种坑,可谓是一路坎坷.本文记录下rocketMq安装的完整过程.希望对你有一点帮助 安装rocketM ...

  9. Redis 3.0 Cluster集群配置

    Redis 3.0 Cluster集群配置 安装环境依赖 安装gcc:yum install gcc 安装zlib:yum install zib 安装ruby:yum install ruby 安装 ...

随机推荐

  1. 通过supper()有参构造器,完成子类对象调用父类属性的方法,并完成赋值

    package com.Summer_0426.cn; /** * @author Summer * 通过supper()有参构造器,完成子类对象调用父类属性的方法,并完成赋值 * */ public ...

  2. codeforces gym #102082C Emergency Evacuation(贪心Orz)

    题目链接: https://codeforces.com/gym/102082 题意: 在一个客车里面有$r$排座位,每排座位有$2s$个座位,中间一条走廊 有$p$个人在车内,求出所有人走出客车的最 ...

  3. RBAC权限管理模型 产品经理 设计

    RBAC权限管理模型:基本模型及角色模型解析及举例 | 人人都是产品经理http://www.woshipm.com/pd/440765.html RBAC权限管理 - PainsOnline的专栏 ...

  4. MYSQL 两表 排除 重复记录

    MySQL之——查询重复记录.删除重复记录方法大全 - 冰河的专栏 - CSDN博客https://blog.csdn.net/l1028386804/article/details/51733585 ...

  5. windows平台上用python 远程线程注入,执行shellcode

    // 转自: https://blog.csdn.net/Jailman/article/details/77573990import sys import psutil import ctypes ...

  6. h5-canvas 单像素操作

    ###1. 自定义获取指定坐标像素 var canvas = document.querySelector("#cav"); if(canvas.getContext){ var ...

  7. win10启动nginx但是访问不了

    首先验证配置,是否正常:nginx -t 我这里配置正常. 我的原因是设置了代理,打开IE浏览器,设置>Internet选项>连接>局域网设置>代理删除.

  8. Servlet的 GenericServlet 和 HttpServlet

    一.GenericServlet? servlet 是一个接口 下面有两个抽象类 GenericServlet 和 HttpServlet 需要被 继承并重写其中的方法. package javawe ...

  9. python常用函数用法整理

    1,zeros函数(同理的还有ones函数) http://www.jb51.net/article/127649.htm 注意: (m,n)是生成m行n列的矩阵,但要生成二维矩阵的时候要用两层括号, ...

  10. xadmin 组件拓展自定义使用

    xadmin 组件相关可选自定义字段 list_display 功能 设置默认的显示字段(列) 配置 list_display = ['name', 'desc', 'detail', 'degree ...