1.上传rocketmq-all-4.5.1-bin-release压缩包,解压
2.添加环境变量
export ROCKETMQ_HOME=/opt/rocketmq-all-4.5.1-bin-release
export PATH=$ROCKETMQ_HOME/bin:$PATH
export NAMESRV_ADDR=120.78.198.134:9876
3.修改启动配置文件 runbroker.sh runnamesvr.sh
4.修改 broker.conf文件
namesrvAddr=127.0.0.1:9876
brokerIP1=120.78.198.134
5.阿里云防火墙配置10911端口
6.服务器上打开10911端口
firewall-cmd --zone=public --add-port=10911/tcp --permanent
firewall-cmd --reload,永久打开端口
- telnet node1 10911 成功
8.关闭防火墙状态下调用mq成功后,再打开防火墙
systemctl stop firewalld.service
systemctl start firewalld.service