RocketMq 5.0 Windows启动

启动namesrv

start mqnamesrv.cmd

#shell
nohup sh bin/mqnamesrv &
RocketMq 5.0 Windows启动_第1张图片

启动Broker

##windows版启动
start mqbrokerproxy.cmd -n localhost:9876 -bc D:\Middleware\rocketmq\rocketmq-all-5.0.0-bin-release\conf\broker.conf

##shell 并开启代理
nohup bin/mqbroker -n 127.0.0.1:9876 -pc conf/proxyConfig.json --enable-proxy &

windows版代理启动新增【mqbrokerproxy.cmd】文件在bin文件夹下面

mqbrokerproxy.cmd

if not exist "%ROCKETMQ_HOME%\bin\runserver.cmd" echo Please set the ROCKETMQ_HOME variable in your environment! & EXIT /B 1

call "%ROCKETMQ_HOME%\bin\runserver.cmd" org.apache.rocketmq.proxy.ProxyStartup -pm local %*

IF %ERRORLEVEL% EQU 0 (
   ECHO "Broker Proxy Model starts OK"
)

代理会默认使用8081端口,如果被占用,将导致Broker应用服务启动失败,使用独立方式启动Proxy

proxyConfig.json

{
    "grpcServerPort": 18081,
    "rocketMQClusterName": "DefaultCluster"
}
RocketMq 5.0 Windows启动_第2张图片

或者直接修改启动脚本,增加【-Denable_proxy=true】使用代理

RocketMq 5.0 Windows启动_第3张图片

启动console

start mqconsole.cmd

nohup java -jar -server -Xms512m -Xmx512m -Xmn512m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m rocketmq-console.jar &

用户名密码:admin admin

链接:https://pan.baidu.com/s/1Nm9Nocf1y2AAd7kn1CMgjg?pwd=hx33

提取码:hx33

RocketMq 5.0 Windows启动_第4张图片

启动proxy

start mqproxy.cmd -n 0.0.0.0:9876 -pc D:\Middleware\rocketmq\rocketmq-all-5.0.0-bin-release\conf\proxyConfig.json

###shell
nohup bin/mqproxy -n 127.0.0.1:9876 -pc conf/proxyConfig.json &

conf目录下新增文件proxyConfig.json

RocketMq 5.0 Windows启动_第5张图片

你可能感兴趣的:(rocketmq)