1.下载解压
wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz tar -zxvf apache-maven-3.5.2-bin.tar.gz mv apache-maven-3.5.2 /usr/local/maven3.5
2.配置环境变量
#编辑profile
vim /etc/profile
#maven MAVEN_HOME=/usr/local/maven3.5 export MAVEN_HOME export PATH=${PATH}:${MAVEN_HOME}/bin
#使配置文件生效
source /etc/profile
验证配置是否成功