安装RocketMq

一、安装RocketMq

1、检查java版本,需要jdk8以上版本

java -version

2、下载包解压

wget https://dist.apache.org/repos/dist/release/rocketmq/5.1.3/rocketmq-all-5.1.3-bin-release.zip
unzip rocketmq-all-5.1.3-bin-release.zip
cd rocketmq-all-5.1.3-bin-release/bin

3、修改runbroker.sh和runserver.sh脚本中的-Xms和-Xmx参数来调整JVM的初始堆内存和最大堆内存。
4、启动nameServer

nohup sh mqnamesrv &

检查是否启动成功

tail -f ~/logs/rocketmqlogs/namesrv.log

5、启动broker

nohup sh mqbroker -n localhost:9876 &

检查是否启动成功

tail -f ~/logs/rocketmqlogs/broker.log

二、安装RocketMq-Dashboard

1、安装maven

wget https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.zip

unzip apache-maven-3.9.4-bin.zip

mv apache-maven-3.9.4 /usr/local/maven

ln -sf /usr/local/maven/bin/mvn /usr/bin/

2、下载源代码

wget https://github.com/apache/rocketmq-dashboard/archive/refs/tags/rocketmq-dashboard-1.0.0.zip

unzip rocketmq-dashboard-1.0.0.zip

cd rocketmq-dashboard-rocketmq-dashboard-1.0.0

3、编译运行

mvn clean package -Dmaven.test.skip=true

cd target

nohup java -jar rocketmq-dashboard-1.0.0.jar &

你可能感兴趣的:(rocketmq)