CentOS7.8安装apache-maven-3.6.3-bin.tar.gz

解压

[root@192 opt]# tar -zxvf apache-maven-3.6.3-bin.tar.gz 

编辑/etc/profile文件,加入环境变量配置

export MAVEN_HOME=/opt/apache-maven-3.6.3
export PATH=${MAVEN_HOME}/bin:${PATH}

输入source /etc/profile,使之立即生效

测试

[root@192 opt]# mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/apache-maven-3.6.3
Java version: 1.8.0_131, vendor: Oracle Corporation, runtime: /opt/jdk1.8.0_131/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1127.13.1.el7.x86_64", arch: "amd64", family: "unix"
posted @ 2020-07-26 14:55  风一样的码农  阅读(186)  评论(0编辑  收藏