jdk 安装包下载
    https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html

    1. cd /tmp
    2. tar xf jdk-8u191-linux-x64.tar.gz -C /usr/local
    3. ln -s /usr/local/jdk1.8.0_191/ /usr/local/jdk
    4. rm -rf /usr/bin/java
    5. ln -s /usr/local/jdk/bin/java /usr/bin/java
    6. cat >> /etc/profile << EOF
    7. export JAVA_HOME=/usr/local/jdk
    8. export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    9. export PATH=$JAVA_HOME/bin:$PATH
    10. EOF
    11. source /etc/profile
    12. tar xf apache-maven-3.5.3-bin.tar.gz -C /usr/local
    13. mv /usr/local/apache-maven-3.5.3 maven-3.5.3
    14. ln -s /usr/local/maven-3.5.3/ /usr/local/maven
    15. systemctl start jenkins
    16. chkconfig --add jenkins
    17. systemctl status jenkins
    18. sudo tee /etc/profile <<-'EOF'
    19. export JAVA_HOME=/usr/local/jdk
    20. export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    21. export PATH=$JAVA_HOME/bin:$PATH
    22. MAVEN_HOME=/usr/local/maven
    23. export MAVEN_HOME
    24. export PATH=${PATH}:${MAVEN_HOME}/bin
    25. EOF
    26. source /etc/profile
    27. mvn -v
    28. java -version