rocketmq 4.2.0集群配置
采用的是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集群配置的更多相关文章
- redis5.0集群配置
介绍 redis自3.0版本以来支持主从模式的集群,可用哨兵监控集群健康状态,但这种方式的集群很不成熟,数据备份需要全量拷贝.在之后的版本才真正支持集群分片. 在redis5.0中去除了以redis- ...
- Redis-5.0.0集群配置
版本:redis-5.0.0 参考:http://redis.io/topics/cluster-tutorial. 集群部署交互式命令行工具:https://github.com/eyjian/re ...
- Hadoop2.0.0+CDH4.5.0集群配置
Hadoop 2.0.0-cdh4.5.0安装:http://blog.csdn.net/u010967382/article/details/18402217 CDH版本下载:http://arch ...
- 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. 目录 ...
- hadoop2.6.0集群配置
1.修改机器名 集群的搭建最少需要三个节点,机器名分别修改为master,slave1,slave2.其中以master为主要操作系统. 修改hostname: sudo gedit /etc/hos ...
- Hadoop-2.6.0 集群的 安装与配置
1. 配置节点bonnie1 hadoop环境 (1) 下载hadoop- 2.6.0 并解压缩 [root@bonnie1 ~]# wget http://apache.fayea.com/had ...
- hadoop集群配置方法---mapreduce应用:xml解析+wordcount详解---yarn配置项解析
注:以下链接均为近期hadoop集群搭建及mapreduce应用开发查找到的资料.使用hadoop2.6.0,其中hadoop集群配置过程下面的文章都有部分参考. hadoop集群配置方法: ---- ...
- rocketMq安装及集群配置
网上关于rocketMq安装.集群配置的文章有很多,作为一个初学者,跟着网上的各种教程安装遇到了各种坑,可谓是一路坎坷.本文记录下rocketMq安装的完整过程.希望对你有一点帮助 安装rocketM ...
- Redis 3.0 Cluster集群配置
Redis 3.0 Cluster集群配置 安装环境依赖 安装gcc:yum install gcc 安装zlib:yum install zib 安装ruby:yum install ruby 安装 ...
随机推荐
- Maven的继承以及import作用域
Maven的pom文件中可继承的元素包括: groupId:项目ID,项目坐标核心元素 version:项目版本 description:描述信息 organization:组织信息 inceptio ...
- Windows将自己的代码发布到Github上
1.在GitHub上创建一个repository 2.在自己的电脑上选择工作的文件夹使用Git Bash clone刚刚创建的repository 3.此时本地git应该已经连接了GitHub,如果没 ...
- IntelliJ IDEA 2018.3 重大升级,哪些功能打动了你?
前言 2018.11.28 IntelliJ IDEA 2018.3 正式版发布.对于一个忠实爱好者,迫不及待的我下载了最新版本来体验下.而且 IDEA 今年的第三次重大更新提供了不容错过的显著功能! ...
- Python是如何实现生成器的原理
python中函数调用的实质原理: python解释器(即python.exe)其实是用C语言编写的, 在执行python代码时,实际上是在用一个叫做Pyeval_EvalFramEx(C语言的函数) ...
- 家庭记账本小程序之改(java web基础版五)
实现修改消费账单 1.main_left.jsp中该部分,调用Servlet中的list方法 2.Servlet中的list方法,调用Dao层的list方法,跳转到list.jsp页面 3.Dao层的 ...
- 【学习总结】GirlsInAI ML-diary day-17-初始dataframe
[学习总结]GirlsInAI ML-diary 总 原博github链接-day17 认识dataframe 一种非常有用的数据类型,叫做"DataFrame",经常缩写为&qu ...
- 【翻译】IdentityServer4:基于资源的配置
这篇文章基于https://leastprivilege.com/2016/12/01/new-in-identityserver4-resource-based-configuration/进行翻译 ...
- asp.net core 中间件粗解
中间件 中间件在asp.net core中非常重要,它用来处理httpcontext.而httpcontext封装了请求和响应.也就是说,中间件是用来处理请求和响应的. 本质上,中间件被封装到了IAp ...
- 字符串格式的方法%s、format和python3.6新特性f-string和类型注解
一.%s msg = '我叫%s,今年%s,性别%s' %('帅哥',18,'男') print(msg) # 我叫帅哥,今年18,性别男 二.format # 三种方式: # 第一种:按顺序接收参数 ...
- 使用bat脚本永久激活Windows系统(摘抄)
使用bat脚本永久激活Windows系统 每次重装完系统后,右下角会提示系统未激活,无法进行一些个性化设置. 在这里我自己写了一个bat脚本用于激活Windows系统.(仅供学习) 文件下载: 链 ...