一、环境说明
ip地址主机名操作系统版本RocketMQ版本JDK版本maven版本备注172.16.7.91nameserver01centos 7.64.8.01.8.0_2913.6Name Server集群172.16.7.92nameserver03centos 7.64.8.01.8.0_2913.6Name Server集群172.16.7.93master01centos 7.64.8.01.8.0_2913.6Broker集群1172.16.7.94slave01centos 7.64.8.01.8.0_2913.6Broker集群1172.16.7.95master02centos 7.64.8.01.8.0_2913.6Broker集群2172.16.7.96slave02centos 7.64.8.01.8.0_2913.6Broker集群2
二、部署概况
三、启动集群
1.启动NameServer[root@nameserver01 bin]# nohup sh mqnamesrv &
2.启动broker
2.1启动master01[root@master01 rocketmq]# pwd/rocketmq[root@master01 rocketmq]# nohup sh bin/mqbroker -c conf/2m-2s-sync/broker-a.properties &
master01节点启动成功
2.2启动slave01[root@slave01 rocketmq]# pwd/rocketmq[root@slave01 rocketmq]# nohup sh bin/mqbroker -c conf/2m-2s-sync/broker-a-s.properties &
slave01启动成功
2.3启动master02[root@master02 rocketmq]# pwd/rocketmq[root@master02 rocketmq]# nohup sh bin/mqbroker -c conf/2m-2s-sync/broker-b.properties &
master02启动成功
2.4启动slave02[root@slave02 rocketmq]# pwd/rocketmq[root@slave02 rocketmq]# nohup sh bin/mqbroker -c conf/2m-2s-sync/broker-b-s.properties &
slave02启动成功
3.启动console[root@nameserver01 rocketmq-console]# pwd/root/rocketmq-externals-master/rocketmq-console[root@nameserver01 rocketmq-console]# cd target/[root@nameserver01 target]# java -jar rocketmq-console-ng-1.0.1.jar
4.登陆console
访问地址:http://172.16.7.91:57690
集群启动正常
四、关闭集群
1.停止console[root@nameserver01 ~]# ps -ef|grep jar|grep -v grep|awk '{print $2}'|xargs kill -9 2.停止broker
停止master01[root@master01 rocketmq]# sh bin/mqshutdown brokerThe mqbroker(9760) is running...Send shutdown request to mqbroker(9760) OK
停止slave02[root@slave01 rocketmq]# sh bin/mqshutdown brokerThe mqbroker(9739) is running...Send shutdown request to mqbroker(9739) OK[root@slave01 rocketmq]# ps -ef|grep rockroot 11577 9656 0 10:53 pts/0 00:00:00 grep --color=auto rock[1]+ 退出 143 nohup sh bin/mqbroker -c conf/2m-2s-sync/broker-a-s.properties
master02和slave02的停止方式同上。
3.停止nameserver[root@nameserver01 rocketmq]# sh bin/mqshutdown namesrvThe mqnamesrv(9746) is running...Send shutdown request to mqnamesrv(9746) OK
单机版RocketMQ搭建详见:Centos7.6搭建RocketMQ4.8全纪录
集群版RocketMQ搭建详见:RocketMQ4.8集群搭建全纪录
|