1.wget方式下载maven或先下载到本地然后上传至服务器
2.解压
tar zxvf apache-maven-3.0.5-bin.tar.gz
3.vi /etc/profile 设置环境变量,你懂得
M2_HOME=/opt/maven/apache-maven-3.0.5 export M2_HOME PATH=$PATH:$M2_HOME/bin export PATH
4.使环境变量生效
source /etc/profile