官网文档
cd /usr/local/rocketmq-all-4.3.2/distribution/target/apache-rocketmq/bin
nohup sh mqnamesrv
tail -f ~/logs/rocketmqlogs/namesrv.log
提示:The Name Server boot success…
nohup sh mqbroker
tail -f ~/logs/rocketmqlogs/broker.log
提示:The broker[%s, 172.30.30.233:10911] boot success…
注:若无法启动,改runbroker.sh和runserver.sh中的启动内存要小于虚拟机内存,两者启动内存大小一致
jps
3601 Jps
3494 NamesrvStartup
3530 BrokerStartup
sh mqshutdown broker
提示:The mqbroker(36695) is running…
Send shutdown request to mqbroker(36695) OK
sh mqshutdown namesrv
提示:The mqnamesrv(36664) is running…
Send shutdown request to mqnamesrv(36664) OK
start mqnamesrv.cmd
start mqbroker.cmd -n 127.0.0.1:9876 autoCreateTopicEnable=true
rocketmq.config.namesrvAddr=192.168.0.220:9876;192.168.0.221:9876
mvn clean package -Dmaven.test.skip=true
java -jar rocketmq-console-ng-1.0.0.jar
vi /ect/hosts
192.168.9.157 rocketmq-nameserver1
192.168.9.157 rocketmq-master1
192.168.9.150 rocketmq-nameserver2
192.168.9.150 rocketmq-master2
192.168.9.154 rocketmq-nameserver3
192.168.9.154 rocketmq-master1-slave
192.168.9.155 rocketmq-nameserver4
192.168.9.155 rocketmq-master2-slave
service network restart
ping 10.43.98.38
ping rocketmq-nameserver2
ping rocketmq-master2
namesrvAddr=rocketmq-nameserver1:9876;rocketmq-nameserver2:9876;rocketmq-nameserver3:9876;rocketmq-nameserver4:9876
主机1修改broker-a.properties文件
主机2修改broker-b.properties文件
从机1修改broker-a-s.properties文件
从机2修改broker-b-s.properties文件
nohup sh mqnamesrv &
主机1:
nohup sh mqbroker -c /usr/local/rocketmq-all-4.3.2/distribution/target/apache-rocketmq/conf/2m-2s-async/broker-a.properties >/dev/null 2>&1 &
主机2:
nohup sh mqbroker -c /usr/local/rocketmq-all-4.3.2/distribution/target/apache-rocketmq/conf/2m-2s-async/broker-b.properties >/dev/null 2>&1 &
从机1:
nohup sh mqbroker -c /usr/local/rocketmq-all-4.3.2/distribution/target/apache-rocketmq/conf/2m-2s-async/broker-a-s.properties >/dev/null 2>&1 &
从机2:
nohup sh mqbroker -c /usr/local/rocketmq-all-4.3.2/distribution/target/apache-rocketmq/conf/2m-2s-async/broker-b-s.properties >/dev/null 2>&1 &
sh mqadmin clusterList -n "192.168.9.157:9876;192.168.9.150:9876;192.168.9.154:9876;192.168.9.155:987
注:可在Windows端开启管控台,步骤以上有,需改application.properties中的namesrvAddr