参考

http://www.linuxidc.com/Linux/2015-10/124112.htm


192.168.1.201

vi /usr/local/tomcat/webapps/appServer/WEB-INF/classes/properties/rocketMQ.properties

mq.host=192.168.1.188

mq.port=9876


查看到MQ服务器在1.188上。

然后Xshell到1.188上,执行

 cd ../bin/
 nohup sh mqnamesrv >/var/log/ns.log &
 nohup sh mqbroker -c ../conf/2m-noslave/broker-a.properties > /var/log/mq.log 2>&1 &

sh mqnamesrv
sh mqbroker -c ../conf/2m-noslave/broker-a.properties


修改./startdeploy.sh文件,自动修改rocketMQ.properties文件

cp rocketMQ.properties rocketMQ.properties.bak

sed -i -e "s/mq.host=192.168.1.125/mq.host=192.168.1.188/g" /root/properties/rocketMQ.properties