1. 下载地址
wget http://apache.fayea.com/apache-mirror/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
2. 解压
tar -xvf apache-maven-3.0.4-bin.tar.gz
3. 写入环境变量
vi /etc/profile
这个前提是安装了jdk1.7.0_17
export MAVEN_HOME=/usr/local/apache-maven-3.0.5
export JAVA_HOME=/usr/local/jdk1.7.0_17
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$MAVEN_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
使之立即生效
source /etc/profile