rocketMQ安装前需要JDK和MAVEN已安装好
- 安装maven,创建目录/usr/local/maven,下载安装包并解压
cd /usr/local/maven wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz tar -zxvf apache-maven-3.6.1-bin.tar.gz
- 编辑配置文件 vim /usr/local/maven/apache-maven-3.6.1/conf/settings.xml,添加阿里镜像仓库地址
<mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>
- 编辑/etc/profile文件,配置maven路径,文件生效
export MAVEN_HOME=/usr/local/maven/apache-maven-3.6.1 export PATH=$PATH:$MAVEN_HOME/bin
source /etc/profile
- 运行mvn –v可以看到maven信息说明安装成功
- 按照http://rocketmq.apache.org/docs/quick-start/官方文档那个的步骤安装启动rocketMQ