上传apache-maven-3.6.3-bin.tar.gz
[root@publick-manage files]# tar xf apache-maven-3.6.3-bin.tar.gz -C /usr/local/
[root@publick-manage files]# ls /usr/local/
配置环境变量,/etc/profile最后加入两行
export MAVEN_HOME=/usr/local/apache-maven-3.6.3/
export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
[root@publick-manage files]# source /etc/profile
[root@publick-manage files]# mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/apache-maven-3.6.3
Java version: 1.8.0_281, vendor: Oracle Corporation, runtime: /usr/local/jdk1.8.0_281/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1062.el7.x86_64", arch: "amd64", family: "unix"
添加jdk和maven
全局属性配置