linux maven 安装

Posted by Tillend on February 25, 2019

linux maven 安装

下载

1
wget https://mirrors.cnnic.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

解压

1
tar -zxvf apache-maven-3.3.9-bin.tar.gz

移动

1
2
mkdir /usr/local/maven
mv apache-maven-3.3.9 /usr/local

环境变量

1
vim /etc/profile.d/maven

配置Maven HOME及PATH

1
2
3
MAVEN_HOME=/usr/local/apache-maven-3.3.9
export MAVEN_HOME
PATH=$MAVEN_HOME/bin:$PATH

验证

1
mvn -v