tar -zxf apache-maven-3.6.0-bin.tar.gz
mv apache-maven-3.6.0 /usr/local/maven
vim /etc/profile
#末尾添加
export PATH=$PATH:/usr/local/maven/bin
#保存退出
source /etc/profile
mvn -v #安装成功,maven版本信息
find / -type f -name settings.xml
vim /usr/local/maven/conf/settings.xml
157 </mirror>
158 -->
159 <mirror>
160 <id>aliyun maven</id>
161 <name>aliyun</name>
162 <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
163 <mirrorOf>central</mirrorOf> # 代表本机去中央仓库的请求拦截,让阿里云来处理
164 </mirror>
165 </mirrors>