1.下载
cd /usr/local/
wget https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
tar -zxf apache-maven-3.9.9-bin.tar.gz
2.配置
vim /etc/environment
##添加以下信息
MAVEN_HOME="/usr/local/apache-maven-3.9.9"
PATH="$MAVEN_HOME/bin:$PATH"
3.应用配置
source /etc/environment
4.查看版本
mvn -version