jdk 安装包下载
https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
cd /tmp
tar xf jdk-8u191-linux-x64.tar.gz -C /usr/local
ln -s /usr/local/jdk1.8.0_191/ /usr/local/jdk
rm -rf /usr/bin/java
ln -s /usr/local/jdk/bin/java /usr/bin/java
cat >> /etc/profile << EOF
export JAVA_HOME=/usr/local/jdk
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
EOF
source /etc/profile
tar xf apache-maven-3.5.3-bin.tar.gz -C /usr/local
mv /usr/local/apache-maven-3.5.3 maven-3.5.3
ln -s /usr/local/maven-3.5.3/ /usr/local/maven
systemctl start jenkins
chkconfig --add jenkins
systemctl status jenkins
sudo tee /etc/profile <<-'EOF'
export JAVA_HOME=/usr/local/jdk
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
MAVEN_HOME=/usr/local/maven
export MAVEN_HOME
export PATH=${PATH}:${MAVEN_HOME}/bin
EOF
source /etc/profile
mvn -v
java -version