惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
LINUX DO - 最新话题
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
月光博客
月光博客
博客园 - 叶小钗
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Tailwind CSS Blog
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog RSS Feed
量子位
美团技术团队
Vercel News
Vercel News
Y
Y Combinator Blog
IT之家
IT之家
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
腾讯CDC
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
罗磊的独立博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
博客园 - 司徒正美
N
Netflix TechBlog - Medium
S
Schneier on Security
博客园 - 聂微东
U
Unit 42
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
Latest news
Latest news

jobcher on 打工人日志

2023-12-21 打工人日报 2023-12-20 打工人日报 2023-12-19 打工人日报 2023-12-18 打工人日报 2023-12-17 打工人日报 2023-12-16 打工人日报 2023-12-15 打工人日报 2023-12-14 打工人日报 2023-12-13 打工人日报 2023-12-12 打工人日报 2023-12-11 打工人日报 2023-12-10 打工人日报 2023-12-09 打工人日报 2023-12-08 打工人日报 2023-12-07 打工人日报 2023-12-06 打工人日报 2023-12-05 打工人日报 2023-12-04 打工人日报 2023-12-03 打工人日报 2023-12-02 打工人日报 2023-12-01 打工人日报 2023-11-30 打工人日报 2023-11-29 打工人日报 2023-11-28 打工人日报 2023-11-27 打工人日报 2023-11-26 打工人日报 2023-11-25 打工人日报 2023-11-24 打工人日报 2023-11-23 打工人日报 2023-11-22 打工人日报 2023-11-21 打工人日报 2023-11-20 打工人日报 2023-11-19 打工人日报 2023-11-17 打工人日报 2023-11-16 打工人日报 2023-11-15 打工人日报 2023-11-14 打工人日报 2023-11-13 打工人日报 2023-11-12 打工人日报 2023-11-11 打工人日报 2023-11-10 打工人日报 2023-11-09 打工人日报 2023-11-08 打工人日报 2023-11-07 打工人日报 2023-11-06 打工人日报 2023-11-05 打工人日报 2023-11-04 打工人日报 2023-11-03 打工人日报 2023-11-02 打工人日报 2023-11-01 打工人日报 2023-10-31 打工人日报 2023-10-30 打工人日报 2023-10-29 打工人日报 2023-10-28 打工人日报 2023-10-27 打工人日报 2023-10-26 打工人日报 2023-10-25 打工人日报 2023-10-24 打工人日报 2023-10-23 打工人日报 2023-10-22 打工人日报 2023-10-21 打工人日报 2023-10-20 打工人日报 2023-10-19 打工人日报 2023-10-18 打工人日报 2023-10-17 打工人日报 2023-10-16 打工人日报 2023-10-15 打工人日报 2023-10-14 打工人日报 2023-10-13 打工人日报 2023-10-12 打工人日报 2023-10-11 打工人日报 2023-10-10 打工人日报 2023-10-09 打工人日报 2023-10-07 打工人日报 2023-10-06 打工人日报 2023-10-05 打工人日报 2023-10-04 打工人日报 2023-10-03 打工人日报 2023-10-02 打工人日报 2023-10-01 打工人日报 2023-09-30 打工人日报 2023-09-29 打工人日报 2023-09-28 打工人日报 2023-09-27 打工人日报 2023-09-26 打工人日报 2023-09-25 打工人日报 2023-09-24 打工人日报 2023-09-23 打工人日报 2023-09-22 打工人日报 2023-09-21 打工人日报 2023-09-20 打工人日报 2023-09-19 打工人日报 2023-09-18 打工人日报 2023-09-17 打工人日报 2023-09-16 打工人日报 2023-09-15 打工人日报 2023-09-14 打工人日报 2023-09-13 打工人日报 2023-09-12 打工人日报 2023-09-11 打工人日报
RocketMQ 安装和启动
2022-01-07 · via jobcher on 打工人日志

RocketMQ 安装和部署

部署 RocketMQ

单机安装构建

  1. 安装 JDK 1.8.0
1yum install java-1.8.0-openjdk*
  1. 安装 Maven
 1wget http://dlcdn.apache.org/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz
 2tar -zxvf apache-maven-3.8.4-bin.tar.gz
 3mv -f apache-maven-3.8.4 /usr/local/
 4vim /etc/profile
 5# 末尾添加
 6export MAVEN_HOME=/usr/local/apache-maven-3.8.4
 7export PATH=${PATH}:${MAVEN_HOME}/bin
 8# 保存
 9source /etc/profile
10# 查看maven是否正常
11mvn -v

快速部署

 1#构建 DLedger
 2git clone https://github.com/openmessaging/openmessaging-storage-dledger.git
 3cd openmessaging-storage-dledger
 4mvn clean install -DskipTests
 5# 构建 RocketMQ
 6git clone https://github.com/apache/rocketmq.git
 7cd rocketmq
 8git checkout -b store_with_dledger origin/store_with_dledger
 9mvn -Prelease-all -DskipTests clean install -U
10# 部署
11cd rocketmq/distribution/target/apache-rocketmq
12sh bin/dledger/fast-try.sh start
13# 通过 mqadmin 运维命令查看集群状态
14sh bin/mqadmin clusterList -n 127.0.0.1:9876

启动单节点

1cd distribution/target/rocketmq-4.9.3-SNAPSHOT/rocketmq-4.9.3-SNAPSHOT
2nohup sh bin/mqnamesrv &
3# 查看 Namesrv 日志
4tail -f ~/logs/rocketmqlogs/namesrv.log
52022-01-07 14:59:29 INFO main - The Name Server boot success. serializeType=JSON
6# 启动 Broker
7nohup sh bin/mqbroker -c conf/broker.conf  -n 127.0.0.1:9876 &
8# 查看 Broker 日志
9tail -f ~/logs/rocketmqlogs/broker.log

如果提示找不到上面的日志文件,应该是没启动成功。
应该是内存不够,RocketMQ 默认用 8g 内存,如果你服务器的内存比较小,可以修改下 bin/runbroker.sh 脚本,将 Broker JVM 内存调小。如:JAVA_OPT="${JAVA_OPT} -server -Xms2g -Xmx2g -Xmn1g"。
再次启动 broker,可以正常启动。

默认情况下,Broker 日志文件所在地址为~/logs/rocketmqlogs/broker.log。如果想要自定义,可以通过 conf/logback_broker.xml 配置文件来进行修改。