This article is only for bloggers learning record, and share any similarity is purely coincidental, thank you!
Download JDK8:
1, download path: http: //www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2, first click Accept License Agreement, and then select the corresponding JDK version, Download.
Linxu uploaded to the server:
1, you can use Xshell Xftp or uploaded to the server specified folder. (Personal favorite: MobaXterm)
2, upload it to the next / soft file (you can choose your own):
start installation:
1, extract the files: tar zxvf jdk-8u201-linux-x64.tar.gz
2, after extracting the jdk directory: /soft/jdk1.8.0_201
3, configure the environment variables: vi / etc / profile
4, and finally add the configuration in the profile and save the environment:
#Java Env
export JAVA_HOME=/soft/jdk1.8.0_201
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
5, the environment variables to take effect: source / etc / profile
verification:
1, enter the command: java -version and javac successful as shown in FIG.