官网:https://rocketmq.apache.org/docs/quick-start/
Mac/Linux 服务器安装 环境要求- 64bit OS, Linux/Unix/Mac is recommended;(Windows user see guide
below) - 64bit JDK 1.8+;
- Maven 3.2.x;
- Git;
- 4g+ free disk for Broker server
download the 4.9.2 source release
安装步骤 解压> unzip rocketmq-all-4.9.2-source-release.zip > cd rocketmq-all-4.9.2/ > mvn -Prelease-all -DskipTests clean install -U > cd distribution/target/rocketmq-4.9.2/rocketmq-4.9.2启动 NameServer
> nohup sh bin/mqnamesrv & > tail -f ~/logs/rocketmqlogs/namesrv.log The Name Server boot success...启动 Broker
> nohup sh bin/mqbroker -n localhost:9876 & > tail -f ~/logs/rocketmqlogs/broker.log The broker[%s, 172.30.30.233:10911] boot success...发送和接收消息测试
# 将 NameServer 的地址告诉消费者客户端 > export NAMESRV_ADDR=localhost:9876 # 发送消息 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer SendResult [sendStatus=SEND_OK, msgId= ... # 接收消息 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer ConsumeMessageThread_%d Receive New Messages: [MessageExt...关闭服务器
> 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控制台安装 源码下载
RocketMQ Console
编译# 编译 mvn clean package -Dmaven.test.skip=true
编译结果
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 40.007 s [INFO] Finished at: 2022-01-01T11:22:16+08:00 [INFO] ------------------------------------------------------------------------启动
# 执行命令 java -jar rocketmq-console-ng-1.0.0.jar --server.port=8080 --rocketmq.config.namesrvAddr=localhost:9876 &访问
访问console
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)