CentOS6.5 MAVEN安装
2017-04-16 本文已影响0人
王励志
信息来源链接:
http://xugang-1017-126-com.iteye.com/blog/1634032
安装
# 从apache官网下载你需要的maven文件
# 解压至/usr/local文件夹
配置环境变量
# 设置maven目录软链接
ln -s apache-maven-3.5.0 currentmaven
# 修改系统环境变量/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"