64位操作系统下载:
https://www.apache.org/dyn/closer.cgi?path=rocketmq/4.7.1/rocketmq-all-4.7.1-source-release.zip
解压rocketMQ压缩包:
unzip rocketmq-all-4.7.1-source-release.zip
安装rocketmq:
mvn-Prelease-all-DskipTestscleaninstall-U
配置环境变量(地址要求在bin目录的上层,包含lib文件夹,其中lib文件夹下是jar包):
ROCKETMQ_HOME="E:\tool\rocketmq\distribution\target\rocketmq-4.7.1\rocketmq-4.7.1"
NAMESRV_ADDR="localhost:9876"
启动NameServer:
start mqnamesrv.cmd
启动broker:
start mqbroker.cmd-nlocalhost:9876autoCreateTopicEnable=true
如果报错:找不到或无法加载主类 Files\jdk1.8.0_101\lib\dt.jar;C:\Program
则需打开bin目录下文件runbroker.cmd 将倒数第二句粘贴为:set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%""