安装说明
虚拟机:VirtualBox
操作用户:root
系统环境:centos6.6 x64
安装方式:tar包安装
软件:apache-maven-3.2.5-bin.zip
软件下载目录:/root/opt
下载地址:http://ftp.riken.jp/net/apache/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.zip
解压移动目录
[root@localhost opt]# tar -zxvf apache-maven-3.3.3-bin.tar.gz
[root@localhost opt]# mv apache-maven-3.3.3 /usr/local/maven
配置环境变量
[root@localhost opt]# vi + /etc/profile
添加配置信息
MAVEN_HOME=/usr/local/maven
PATH=$PATH:$MAVEN_HOME/bin
export PATH MAVEN_HOME
使环境变量生效
[root@localhost opt]source /etc/profile
验证是否安装成功
[root@localhost ~]# mvn -v
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00)
Maven home: /usr/local/maven
Java version: 1.8.0_45,vendor: Oracle Corporation
Java home: /usr/java/jdk1.8.0_45/jre
Default locale: zh_CN,platform encoding: UTF-8
OS
参考地址:
http://www.cnblogs.com/gao241/archive/2013/04/08/3008380.html
原文来自:https://my.oschina.net/jiangbianwanghai/blog/472939
原文链接:https://www.f2er.com/centos/379801.html