1. 下载Maven安装包
wget http://apache.fayea.com/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
2. 解压
tar -zxvf apache-maven-3.3.9-bin.tar.gz
mv apache-maven-3.3.9 /usr/local/apache-maven-3.3.9
4. 配置环境变量,在尾部追加配置
vi /etc/profile
export MAVEN_HOME=/usr/local/apache-maven-3.3.9
export PATH=${MAVEN_HOME}/bin:${PATH}
5. 使更改立即生效
soucre /etc/profile
6.检查是否安装成功
mvn -v