1、安装 JDK 环境
// 在页面中找到 jdk 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
# wget http://jdk 下载地址
# mv jdk-8u171-linux-x64.tar.gz\?AuthParam\=1530948616_706a7753f0ce37ce9b7f13ccc8b896b0 jdk-8u171-linux-x64.tar.gz
# tar xvf jdk-8u171-linux-x64.tar.gz -C /usr/local
# echo 'JAVA_HOME=/usr/local/jdk1.8.0_171' >> /etc/profile
# echo 'PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile
# source /etc/profile
# java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
2、安装 Maven
# wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
# tar xvf apache-maven-3.3.9-bin.tar.gz -C /usr/local/
# ln -s /usr/local/apache-maven-3.3.9/ /usr/local/maven-3.3.9
# echo "export MAVEN_HOME=/usr/local/maven-3.3.9" >> /etc/profile
# echo 'export PATH=$PATH:$MAVEN_HOME/bin' >> /etc/profile
# mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /usr/local/maven-3.3.9
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/local/jdk1.8.0_171/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-327.36.1.el7.x86_64", arch: "amd64", family: "unix"