1. Upload the jdk version of the package
Download JDK address: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2. Decompression
tar -zxvf /package/jdk-7u80-linux-x64.tar.gz or rename: mv jdk1.8.0_lll jdk1.8
3. Configure jdk variables and edit the profile file
vi /etc/profile
export JAVA_HOME=/package/jdk1.7.0_80 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin
6. Refresh the system version:
source /etc/profile to make the profile file take effect immediately
source /etc/profile