1.下载maven
http://maven.apache.org/download.cgi
2.解压
tar xzvf apache-maven-3.1.0.tar.gz
3.配置环境变量
sudo gedit /etc/profile
#set Maven environment
export MAVEN_HOME=/usr/local/devtools/apache-maven-3.1.0
export PATH=${MAVEN_HOME}/bin:${PATH}
4.让环境变量配置生效
source /etc/profile
5.验证maven是否配置成功
mvn -v