一、配置JAVA环境
1.下载JDK1.8
wget http://haixi.sfkcn.com:8080/201704/tools/jdk-linux-x64.tar.gz
2.创建JAVA路径
mkdir -p /usr/local/java
3.将下载的tar.gz包解压至JAVA路径
tar -xzvf jdk-linux-x64.tar.gz -C /usr/local/java/
4.将JAVA_HOME引入环境变量
vim /etc/profile
# set Java environment
JAVA_HOME=/usr/local/java/jdk1.8.0_131
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
source /etc/profile
5.验证安装
java -version
二、配置Maven环境
1.下载Maven
wget http://mirrors.shuosc.org/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
2.创建Maven路径
mkdir -p /usr/local/maven
3.将下载的tar.gz解压至Maven路径
tar -xzvf apache-maven-3.5.2-bin.tar.gz -C /usr/local/maven/
4.将MAVEN_HOME引入环境变量
vim /etc/profile
MAVEN_HOME=/usr/local/maven/apache-maven-3.5.2
export MAVEN_HOME
export PATH=${PATH}:${MAVEN_HOME}/bin
source /etc/profile
5.验证安装
mvn -v