![](https://csdnimg.cn/release/download_crawler_static/89571818/bg1.jpg)
# 一、环境搭建
环境版本
```
centos7
jdk1.8 已搭建好
rocketmq4.3
```
## 1、下载安装包
网址
```
https://www.apache.org/dyn/closer.cgi?path=rocketmq/4.3.2/rocketmq-all-4.3.2-bin-release.zip
# We suggest the following mirror site for your download:官方建议下载地址
http://mirrors.tuna.tsinghua.edu.cn/apache/rocketmq/4.3.2/rocketmq-all-4.3.2-bin-release.zip
```
## 2、上传文件
```
[root@localhost mysoft]# pwd
/usr/local/mysoft
[root@localhost mysoft]# unzip rocketmq-all-4.3.2-bin-release.zip
[root@localhost mysoft]# mv rocketmq-all-4.3.2-bin-release rocket4.3
[root@localhost mysoft]# rm -f rocketmq-all-4.3.2-bin-release.zip
```
## 3、修改相关配置
rocketmq 的默认配置极其耗内存,要进行修改。
1)修改 runserver.sh 配置
注释掉原来的,添加新配置
```
[root@localhost bin]# vim runserver.sh
#JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -Xmn2g -XX:MetaspaceSize=128m
-XX:MaxMetaspaceSize=320m"
JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn512m -XX:MetaspaceSize=128m
-XX:MaxMetaspaceSize=320m"