首页 > 代码库 > CentOS6.2安装maven3.2.5

CentOS6.2安装maven3.2.5

1、下载maven

目前最新版本是3.2.5

官网下载linux的版本的:apache-maven-3.2.5-bin.tar.gz

2、上传到主机,解压

3、配置环境变量
hadoop03 ~]$ vi .bash_profile
M2_HOME=/home/linkage/maven/apache-maven-3.2.5
export M2_HOME

PATH=$PATH:$M2_HOME/bin

. .bash_profile(使配置生效)


4、验证
hadoop03 ~]$ mvn -v
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-15T01:29:23+08:00)
Maven home: /home/linkage/maven/apache-maven-3.2.5
Java version: 1.6.0_22, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-220.el6.x86_64", arch: "amd64", family: "unix"

完成。


本文出处:

http://blog.csdn.net/ouyida3

2015.2.2

CentOS6.2安装maven3.2.5