Maven安装

本文记录一下Maven工具的安装,我的系统是Centos6.8,安装Maven3.6。

注:目录根据自己的修改

1.下载Maven安装包

  下载地址:http://maven.apache.org/download.cgi

2.解压

[root@dell01 software]# tar -zxvf apache-maven-3.6.3-bin.tar.gz -C /opt/module/

3.修改系统配置文件

[root@dell01 ~]# vim /etc/profile
#maven_home
export M2_HOME=/opt/module/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin

4.让配置生效

[root@dell01 ~]# source /etc/profile

5.查看Maven,验证是否安装成功

[root@dell01 ~]# mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/module/apache-maven-3.6.3
Java version: 1.8.0_211, vendor: Oracle Corporation, runtime: /opt/module/jdk1.8.0_211/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-642.el6.x86_64", arch: "amd64", family: "unix"

可以了!

posted @ 2020-04-26 10:03  济默  阅读(170)  评论(0编辑  收藏  举报