[root@Jenkins-173-121 software]# wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
tar -zxvf apache-maven-3.3.9-bin.tar.gz
mv apache-maven-3.3.9 maven
vim /etc/profile
在/etc/profile文件末尾增加以下配置:
M2_HOME=/home/software/maven
export PATH=${M2_HOME}/bin:${PATH}
source /etc/profile
mvn -v
原文链接:https://www.f2er.com/centos/374689.html