1.下载安装包
1).下载安装包
wget http:
2).解压
tar -zxvf apache-maven-3.3.9-bin.tar.gz
3).mv到指定文件夹
mv apache-maven-3.3.9 /usr/local/maven
2.配置环境变量
1).修改配置文件 /etc/profile增加maven环境变量
export MAVEN_HOME=/usr/local/maven
export PATH=${PATH}:${MAVEN_HOME}/bin
2).使配置文件生效
source /etc/profile
3.可以使用mvn命令了
[root@VM_200_212_centos webServer]# mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /usr/local/maven
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: /home/fr_ext/java/default/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-504.30.3.el6.x86_64", arch: "amd64", family: "unix"