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 安装 ...
随机推荐
- PS制作水火相溶特效文字图片
最终效果 一.新建一个1400*900像素的画布. 二.由上到下拉一个深灰到纯黑径向渐变. 三.输入字母S,并用ctrl+t拉到适合的大小,并且降低不透明度. 四.拖入水花素材(如果大家有水花笔刷的话 ...
- 【转】/bin/bash^M: bad interpreter: No such file or directory
执行一个脚本full_build.sh 时, 一直是提示我: -bash: ./full_build.sh: /bin/bash^M: bad interpreter: No such file or ...
- CodeForces 1151B Dima and a Bad XOR
题目链接:http://codeforces.com/contest/1151/problem/B 题目大意: 给定一个n*m的矩阵,里面存放的是自然数,要求在每一行中选一个数,把他们异或起来后结果大 ...
- Teching Yourself Programming in Ten Years -Peter Norvig
http://norvig.com/21-days.html 我们经常能看到“7天搞定51单片机”.“21天学会C++”这样样式的标题,编程真的很容易吗?似乎比其他事情要简单很多呀!是的,糟糕的编程确 ...
- javaWeb1之Servlet
Servlet Servlet 环境设置 servlet是扩展web服务器功能的组件规范.浏览器发送请求给web服务器,如果是动态资源的请求,web服务器会将请求转发给servlet容器来处理(由容器 ...
- Windows Server 2016激活方法+密钥+遇到的问题及解决办法(摘抄)
Windows Server 2016激活方法+密钥+遇到的问题及解决办法 2018年08月30日 13:47:34 Brozer 阅读数:28667 这两天公司准备部署Revit Server ...
- zookeeper在windows及linux(含多节点)环境下安装及其命令使用
zookeeper下载 下载url:http://www.apache.org/dyn/closer.cgi/zookeeper/ windows下安装zookeeper 解压到D盘 创建logs目录 ...
- 配置ssh免密登录服务器
当前服务器环境为ubantu 14.04 一.本地 ①生成id_rsa id_rsa.pub ssh-keygen -t rsa -C "xxxxx@xxxxx.com" ss ...
- Logstash替换字符串,解析json数据,修改数据类型,获取日志时间
在某些情况下,有些日志文本文件类json,但它的是单引号,具体格式如下,我们需要根据下列日志数据,获取正确的字段和字段类型 {'usdCnyRate': '6.728', 'futureIndex': ...
- BZOJ3864: Hero meet devil(dp套dp)
Time Limit: 8 Sec Memory Limit: 128 MBSubmit: 397 Solved: 206[Submit][Status][Discuss] Description ...