安装环境:
win10 64位
64位 JDK 1.8+
Maven 3.2.X
- 下载 去官网下载RocketMq版本https://rocketmq.apache.org/dowloading/releases/
- 安装及启动
1、前提条件:已安装jdk1.8及maven
2、将下载文件解压到任务目录,我的放在E盘
3、配置环境变量
变量名:ROCKETMQ_HOME
变量值:E:ProgramRocketmq ocketmq-all-4.9.0-bin-release
4、启动NAMESERVER
在rocketmq的bin目录下,打开cmd,
执行:
start mqnamesrv.cmd
若成功会弹出如下提示框,请勿关闭此框。
5、启动BROKER
在rocketmq的bin目录下,打开cmd,
执行:
start mqbroker.cmd -n 127.0.0.1:9876 autoCreateTopicEnable=true
若成功会弹出如下提示框,请勿关闭此框。
- RocketMQ插件部署
1. 下载
地址:https://github.com/apache/rocketmq-externals.git
下载完成之后,进入‘rocketmq-externals ocketmq-consolesrcmain esources’文件夹,打开‘application.properties’进行配置。
server.address=0.0.0.0 server.port=8083 ### 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-console 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, you can set it in ops page.default localhost:9876 rocketmq.config.namesrvAddr=127.0.0.1:9876 #if you use rocketmq version < 3.5.8, rocketmq.config.isVIPChannel should be false.default true rocketmq.config.isVIPChannel= #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=
2. 编译启动
使用idea打开rocketmq-externals
ocketmq-console项目文件夹,编译->生成-> 生成java 打包jar 包,我的用的版本比较高,生成的是2.0版本
打包成功之后,Cmd进入打包后的文件夹,执行‘java -jar rocketmq-console-ng-2.0.0.jar’,启动项目。
3.测试
浏览器中输入‘127.0.0.1:配置端口’,成功后即可查看。