RocketMQ搭建
RocketMQ也已经加入了apache的开源项目,今天说说windows下的搭建1 下载安装包方式1(自己编译)下载:https://www.apache.org/dyn/closer.cgi?path=rocketmq/4.4.0/rocketmq-all-4.4.0-source-release.zip方式2,编译好的下载:https://www.apache.org/d...
RocketMQ也已经加入了apache的开源项目,今天说说windows下的搭建
1 下载安装包
- 方式1(自己编译)
下载:https://www.apache.org/dyn/closer.cgi?path=rocketmq/4.4.0/rocketmq-all-4.4.0-source-release.zip
- 方式2,编译好的
下载:https://www.apache.org/dyn/closer.cgi?path=rocketmq/4.4.0/rocketmq-all-4.4.0-bin-release.zip
2.使用maven编译(方式一需要这一步)
> unzip rocketmq-all-4.4.0-source-release.zip
> cd rocketmq-all-4.4.0/
> mvn -Prelease-all -DskipTests clean install -U
> cd distribution/target/apache-rocketmq
3.先启动Name Server
> nohup sh bin/mqnamesrv &
> tail -f ~/logs/rocketmqlogs/namesrv.log
The Name Server boot success...
windows平台:
配置环境变量:ROCKETMQ_HOME:解压后的mq目录路径,注意是bin目录所在的那层目录
start mqnamesrv.cmd
4.启动Broker
> nohup sh bin/mqbroker -n localhost:9876 &
> tail -f ~/logs/rocketmqlogs/broker.log
The broker[%s, 172.30.30.233:10911] boot success...
windows平台:
start mqbroker.cmd -n 127.0.0.1:9876 autoCreateTopicEnable=true
5.关闭服务
> sh bin/mqshutdown broker
The mqbroker(36695) is running...
Send shutdown request to mqbroker(36695) OK
> sh bin/mqshutdown namesrv
The mqnamesrv(36664) is running...
Send shutdown request to mqnamesrv(36664) OK
6.可视化管理控制台rocketmq-console-ng
- 下载源码 https://github.com/apache/incubator-rocketmq-externals
- 进入rocketmq-console目录,打包
mvn package
- 运行,需要jdk1.8
进入target目录
java -jar rocketmq-console-ng-1.0.0.jar --server.port=12581 --rocketmq.config.namesrvAddr=127.0.0.1:9876
如果不想配置这么多参数,你可以直接在rocketmq-console-ng目录里的application.properties文件中修改完毕后再打包,这样就只需要运行java -jar rocketmq-console-ng-1.0.0.jar
- 启动成功后,我们就可以通过浏览器访问http://localhost:12581进入控制台界面了,如下图:
![SouthEast][1]
别忘了关注我 mike啥都想搞
[1]: https://image-static.segmentfault.com/266/488/2664882137-5c500956946ac_articlex
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)