栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

rocketMQ系列(4)windows下RocketMQ安装部署

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

rocketMQ系列(4)windows下RocketMQ安装部署

windows下RocketMQ安装部署

一.预备环境

1.系统

​ Windows

  1. 环境

​ JDK1.8、Maven、Git

二. RocketMQ部署

1.下载

1.1地址:http://rocketmq.apache.org/release_notes/
http://rocketmq.apache.org/release_notes/
1.2选择一个稳定版本的 ‘Binary’进行下载


1.3解压已下载工程

rocketmq-all-4.9.1-bin-release

  1. 启动

3.1 启动NAMESERVER

进入至‘MQ文件夹bin’下,然后执行‘ mqnamesrv.cmd’,启动NAMESERVER。成功后会弹出提示框,此框勿关闭。

3.2 启动BROKER

进入至‘MQ文件夹bin’下,然后执行‘ mqbroker.cmd ’,启动BROKER。成功后会弹出提示框,此框勿关闭。

可以调节一下配置

三. RocketMQ插件部署

  1. 下载

​ 地址:https://github.com/apache/rocketmq-externals.git
旧版本有console目录

新版本已没有console目录

但项目readme文后面有这么一句

Incubator Projects RocketMQ Dashboard

Notice: 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.

之前的rocket-console已经不在这个仓库了,已经创建了一个独立的仓库并命名为RocketMQ Dashboard。新版本前台页面地址为https://github.com/apache/rocketmq-dashboard

​ 下载完成之后,进入‘rocketmq-externalsrocketmq-consolesrcmainresources’,或者

rocketmq-dashboardsrcmainresources文件夹

打开‘application.properties’进行配置。

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR ConDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

server.address=127.0.0.1
server.port=22222

### 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, 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=
rocketmq.config.useTLS=false

我们可以将“server.port=8080” 这个端口配置修改一下,修改成22222.

其次需要注意这里的“rocketmq.config.namesrvAddr=”配置,即需要设置自己的rocketmq的name服务的地址和端口号。默认端口号是9876。

rocketmq.config.namesrvAddr=127.0.0.1:9876

  1. 编译启动

​ 进入‘rocketmq-externalsrocketmq-console’或者‘rocketmq-dashboard’文件夹,执行‘mvn clean package -Dmaven.test.skip=true’,编译生成。

​ 编译成功之后,Cmd进入‘target’文件夹,执行‘java -jar rocketmq-console-ng-1.0.0.jar’,或者‘rocketmq-dashboard-2.0.0.jar’ 启动‘rocketmq-console-ng-1.0.0.jar’或者‘rocketmq-dashboard-2.0.0.jar’。

3.测试

​ 浏览器中输入‘127.0.0.1:配置端口’,成功后即可查看。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/274665.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号