將下載完的jdk-8u144-linux-x64.tar.gz放在/home目錄下java
tar xzvf jdk-8u144-linux-x64.tar.gz
配置java環境變量linux
vi /etc/profile,加入如下內容apache
export JAVA_HOME=/home/jdk1.8.0_152 #java安裝路徑 export CLASSPATH=.:$JAVA_HOME/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin #更新 source /etc/profile
yum search java|grep jdk yum install java-1.8.0-openjdk.x86_64
wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz tar xzvf apache-maven-3.5.0-bin.tar.gz
配置環境bash
vi /etc/profile,加入一些內容 export MAVEN_HOME=/home/apache-maven-3.5.2 #maven安裝路徑 export PATH=$PATH:$MAVEN_HOME/bin
echo $JAVA_HOMEmaven