windows下RocketMQ的安装部署
一.预备环境
1.系统
Windows
2. 环境
JDK1.8、Maven、Git
二. RocketMQ部署
1.下载
1.1地址:http://rocketmq.apache.org/release_notes/release-notes-4.2.0/
1.2选择‘Binary’进行下载
1.3解压已下载工程
![](https://upload-images.jianshu.io/upload_images/7076022-1313fcd60be83083.png?imageMogr2/auto-orient/strip|imageView2/2/w/553/format/webp)
2. 配置
2.1 系统环境变量配置
变量名:ROCKETMQ_HOME
变量值:MQ解压路径\MQ文件夹名
![](https://img2018.cnblogs.com/blog/1273541/201910/1273541-20191016202256063-196661529.png)
2.2重启服务器
3. 启动
3.1 启动NAMESERVER
Cmd命令框执行进入至‘MQ文件夹\bin’下,然后执行‘start mqnamesrv.cmd’,启动NAMESERVER。成功后会弹出提示框,此框勿关闭。
![](https://upload-images.jianshu.io/upload_images/7076022-2cf50fba6f013f1d.png?imageMogr2/auto-orient/strip|imageView2/2/w/554/format/webp)
3.2 启动BROKER
cmd命令框执行进入至‘MQ文件夹\bin’下,然后执行‘start mqbroker.cmd -n 127.0.0.1:9876 autoCreateTopicEnable=true’,启动BROKER。成功后会弹出提示框,此框勿关闭。
![](https://upload-images.jianshu.io/upload_images/7076022-9449327d27c36c25.png?imageMogr2/auto-orient/strip|imageView2/2/w/554/format/webp)
假如弹出提示框提示‘错误: 找不到或无法加载主类 xxxxxx’。打开runbroker.cmd,然后将‘%CLASSPATH%’加上英文双引号。保存并重新执行start语句。
![](https://upload-images.jianshu.io/upload_images/7076022-94da1a06b0e8fffa.png?imageMogr2/auto-orient/strip|imageView2/2/w/554/format/webp)
三. RocketMQ插件部署
1. 下载
地址:https://github.com/apache/rocketmq-externals.git
下载完成之后,进入‘rocketmq-externals\rocketmq-console\src\main\resources’文件夹,打开‘application.properties’进行配置。
![](https://img2018.cnblogs.com/blog/1273541/201910/1273541-20191016203040054-765174827.png)
2. 编译启动
进入‘\rocketmq-externals\rocketmq-console’文件夹,执行‘mvn clean package -Dmaven.test.skip=true’,编译生成。
![](https://img2018.cnblogs.com/blog/1273541/201910/1273541-20191016202412891-1333029109.png)
![](https://img2018.cnblogs.com/blog/1273541/201910/1273541-20191016202434035-2082277069.png)
编译成功之后,Cmd进入‘target’文件夹,执行‘java -jar rocketmq-console-ng-1.0.0.jar’,启动‘rocketmq-console-ng-1.0.0.jar’。
3.测试
浏览器中输入‘127.0.0.1:配置端口’,成功后即可查看。
![](https://img2018.cnblogs.com/blog/1273541/201910/1273541-20191016202545127-396275824.png)
![](https://img2018.cnblogs.com/blog/1273541/201910/1273541-20191016202642761-1014963690.png)