https://mirrors.huaweicloud.com/apache
https://mirrors.huaweicloud.com/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
1、下载
wget https://mirrors.huaweicloud.com/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
2、解压
tar -zxvf apache-maven-3.6.3-bin.tar.gz
tar -zxvf apache-maven-3.6.3-bin.tar.gz -C /opt/local
3、修改/etc/profile
vim /etc/profile
在文件末尾shift+g追加如下内容:
export M2_HOME=/opt/local/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin
4、使配置生效
source /etc/profile
5、查看maven版本
mvn -v