信息來源鏈接:
http://xugang-1017-126-com.iteye.com/blog/1634032
安裝
# 從apache官網(wǎng)下載你需要的maven文件
# 解壓至/usr/local文件夾
配置環(huán)境變量
# 設(shè)置maven目錄軟鏈接
ln -s apache-maven-3.5.0 currentmaven
# 修改系統(tǒng)環(huán)境變量/etc/profile,加入以下信息
# Maven environment
M2_HOME=/usr/local/currentmaven
PATH=$PATH:$M2_HOME/bin
export M2_HOME PATH
# 通過source命令使修改生效
source /etc/profile
查看maven版本信息
# 查看maven版本
mvn -v
[root@iZ28nvy56w8Z local]# mvn -v
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)
Maven home: /usr/local/currentmaven
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/java/jdk1.8.0_121/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.23.3.el6.x86_64", arch: "amd64", family: "unix"