1. Download jdk files, such as jdk-8u131-linux-x64.tar.gz
2. Upload JDK files to Linux host 3 using tools such as FlashFXP .
Install JDK
#切换root用户
[Sundy@centos7] Su root
......
# Extract JDK Files
[Root@centos7] TAR-ZXVF jdk-8u131-linux-x64.tar.gz
# move JDK files to the storage directory
[Root@centos7] mv./jdk1.8.0_131/opt/java/
# Configure Environment variables
[Root@centos7] Vim/etc/profile
Add the following at the end of the file
Export java_home=/opt/java/jdk1.8.1_131
export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar:$ Java_home/lib/tools.jar
export path= $PATH: $JAVA _home/bin
# Reload the/etc/profile file with the source command
[Root@centos7] Source/etc/profile
[Root@centos7] Java-version
Java version "1.8.0_131"
Java (tm) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot (tm) 64-bit Server VM ( Build 25.131-b11, Mixed mode)