cd /data/software
wget http://mirrors.hust.edu.cn/apache/rocketmq/4.3.0/rocketmq-all-4.3.0-source-release.zip
unzip rocketmq-all-4.3.0-source-release.zip
cd rocketmq-all-4.3.0
mvn -Prelease-all -DskipTests clean install -U
cd distribution/target/apache-rocketmq
启动NameServer
nohup sh bin/mqnamesrv &
启动Broker
nohup sh bin/mqbroker -n localhost:9876 &
问题处理
mqbroker默认的jvm配置在bin/runbroker中
JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g -Xmn4g"
如果环境内存比较小会启动mybroker会报内存错误,只要修改这个配置即可解决