赞
踩
输入命令
[root@bigData-02 ~]# java –version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
如果出现以上数据,表明已经安装成功jdk。如果没有安装,使用yum安装jdk。
[root@bigData-02 ~]# yum install jdk
[root@bigData-02 ~]# wget http://apache.fayea.com/apache-mirror/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
[root@bigData-02 ~]# tar -zxvf apache-maven-3.0.5-bin.tar.gz
[root@bigData-02 ~]# vi /etc/profile
export MAVEN_HOME="/usr/local/apache-maven-3.0.5"
export path=$path: $MAVEN_HOME/bin
[root@bigData-02 ~]#source /etc/profile
4)检查是否安装成功
[root@bigData-02 ~]# mvn -v
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:28+0800)
Maven home: /usr/local/apache-maven-3.0.5
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: /usr/local/jdk1.7.0_51/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-358.el6.x86_64", arch: "amd64", family: "unix"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。