-
-
进行解压
-
tar -zxvf apache-maven-3.0.5-bin.tar.gz -C /export/servers/
-
-
修改环境变量
-
vim /etc/profile
-
#maven export MAVEN_HOME=/export/servers/apache-maven-3.0.5 export PATH=$PATH:$MAVEN_HOME/bin
-
-
source /etc/profile
-
-
查看是否安装成功
-
mvn -version
-
显示如下信息
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:28+0800) Maven home: /export/servers/apache-maven-3.0.5 Java version: 1.8.0_65, vendor: Oracle Corporation Java home: /export/servers/jdk1.8.0_65/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-573.el6.x86_64", arch: "amd64", family: "unix"
-
-
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240826070647288-243310440.jpg)