####安装配置maven
1、下载maven
下载地址http://maven.apache.org/download.cgi,版本 apache-maven-3.5.14 -bin.tar.gz
tar -xvf apache-maven-3.5.14 -bin.tar.gz
2、配置环境变量
--读取环境变量文件
vi /etc/profile
--配置环境
export MAVEN_HOME=/opt/apache-maven-3.5.14
export PATH=$MAVEN_HOME/bin:$PATH
--保存退出(:wq)执行命令是更改生效
source /etc/profile
--运行mvn -v查看maven是否安装成功,如果配置成功,则打印如下信息
mvn -v
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)
Maven home: /opt/apache-maven-3.5.14
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /opt/jdk1.8.0_191
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-514.6.2.el7.x86_64", arch: "amd64", family: "unix"