系统环境
一.系统
windows
二.安装环境
jdk.8,maven, git
1. 下载安装
1.1下载
选择Binary 下载
官网:
https://rocketmq.apache.org/release_notes/release-notes-4.5.2/
1.2 解压
2. 配置系统环境变量
变量名:ROCKETMQ_HOME
变量值:mq安装路径
3.启动
3.1 启动NAMESERVER
Cmd命令框执行进入至‘MQ文件夹\bin’下,然后执行‘start mqnamesrv.cmd’或者点击 mqnamesrv.cmd,启动NAMESERVER。成功后会弹出提示框,此框勿关闭。
3.2 启动BROKER
Cmd命令框执行进入至‘MQ文件夹\bin’下,然后执行‘start mqbroker.cmd -n 127.0.0.1:9876 autoCreateTopicEnable=true’,启动BROKER。成功后会弹出提示框,此框勿关闭。
4.RocketMQ插件部署
4.1. 下载
地址:https://github.com/apache/rocketmq-externals.git
如果下载不成功,将htts 更改为http
git clone http://github.com/apache/rocketmq-dashboard.git
下载完成之后,进入‘rocketmq-externals\rocketmq-console\src\main\resources’文件夹,打开‘application.properties’进行配置。
注!
重点
这里如果rocketmq-externals是最新版的是没有rocketmq-console目录的
我的就没有
我们直接通过官网下载地址去git仓库查看
官网的也没有,咋回事儿呢,往下看
Console has renamed to dashboard and transfered the new repo, it will graduate in the near future, and welcome you to fill in the user due diligence.
大体意思为,console已经重新开了一个仓库,名为Dashboard,我们去这下载就可以了
4.2 点击RocketMQ_Dashboard
进入仓库
点击下载
4.3 编辑src/main/resouces/application.properties
配置外网访问mq地址以及mq真实地址以及端口
#外网访问mq地址端口
server.address=0.0.0.0
server.port=8088
### SSL setting
#server.ssl.key-store=classpath:rmqcngkeystore.jks
#server.ssl.key-store-password=rocketmq
#server.ssl.keyStoreType=PKCS12
#server.ssl.keyAlias=rmqcngkey
#spring.application.index=true
spring.application.name=rocketmq-dashboard
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true
logging.level.root=INFO
logging.config=classpath:logback.xml
#if this value is empty,use env value rocketmq.config.namesrvAddr NAMESRV_ADDR | now, default localhost:9876
#use @ to distinct the namesrv of different clusters
# mq地址端口,根据情况自己配置
rocketmq.config.namesrvAddrs=127.0.0.1:9876
#if you use rocketmq version < 3.5.8, rocketmq.config.isVIPChannel should be false.default true
rocketmq.config.isVIPChannel=
#timeout for mqadminExt, default 5000ms
rocketmq.config.timeoutMillis=
#rocketmq-console's data path:dashboard/monitor
rocketmq.config.dataPath=/tmp/rocketmq-console/data
#set it false if you don't want use dashboard.default true
rocketmq.config.enableDashBoardCollect=true
#set the message track trace topic if you don't want use the default one
rocketmq.config.msgTrackTopicName=
rocketmq.config.ticketKey=ticket
#Must create userInfo file: ${rocketmq.config.dataPath}/users.properties if the login is required
rocketmq.config.loginRequired=false
#set the accessKey and secretKey if you used acl
#rocketmq.config.accessKey=
#rocketmq.config.secretKey=
rocketmq.config.useTLS=false
4.4 编译启动
在rocketmq-dashboard 下打包编译打包项目
编译命令
mvn clean package -Dmaven.test.skip=true
4.5 运行
打包完成之后运行jar文件
java -jar C:\Users\admin\Downloads\mq\rocketmq-all-4.5.2-bin-release\soft\rocketmq-console\rocketmq-dashboard-master\target\rocketmq-dashboard-1.0.1-SNAPSHOT.jar
5.访问rocketmq
localhost:8088