1、安装开发者工具包
yum install java-1.7.-openjdk-devel -y
2、配置环境变量
vim /etc/profile export JAVA_HOME=/usr/lib/jvm/java-1.7.-openjdk-1.7.0.95.x86_64
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:${PATH} source /etc/profile
3、安装maven
wget http://apache.fayea.com/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
tar xzvf apache-maven-3.3.-bin.tar.gz
4、配置maven环境变量
export MAVEN_HOME=/data/apache-maven-3.3.
export PATH=${MAVEN_HOME}/bin:${PATH}
5、配置maven本地仓库的位置
cd /data/apache-maven-3.3.
vim settings.xml
--设置本地仓库的位置
<localRepository>/data/maven/repo</localRepository>
mvn -v
mvn clean