1、maven的下载
2、maven的安装和环境变量配置
系统环境linux centos7.2 x64
1、maven的下载
下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/
2、maven的安装和环境变量配置
tar xvf apache-maven-3.3.-bin.tar.gz -C /usr/local/
环境变量配置
vim /etc/profile
在profile文本内添加以下内容
#Maven3.3.9
export MAVEN_HOME=/usr/local/apache-maven-3.3.
export PATH=${PATH}:${MAVEN_HOME}/bin
source /etc/profile #更新配置生效
配置完成,验证
mvn -v #查看maven版本
屏幕输出版本信息,表示安装配置成功
Apache Maven 3.3. (bb52d8502b132ec0a5a3f4c09453c07478323dc5; --11T00::+:)
Maven home: /usr/local/apache-maven-3.3.
Java version: 1.8.0_152, vendor: Oracle Corporation
Java home: /usr/local/jdk1..0_152/jre
Default locale: en_US, platform encoding: UTF-
OS name: "linux", version: "3.10.0-862.el7.x86_64", arch: "amd64", family: "unix"