Jdk1.8:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
JDK Installation
1. Upload JDK installation files to Linux
There are many kinds of methods, such as mount, share files, FTP, wget, etc., I use the SCP command
SCP jdk-8u131-linux-x64.rpm [Email protected]:/xiaol/software/
2. Login to Linux to enter the/xiaol/software/directory
Cd/xiaol/software/
3. Installing with tar
TAR-ZXVF jdk-8u131-linux-x64.tar.gz
4. Verify that the installation is successful
The jdk1.8.0_131 folder is created in/xiaol/software/after the previous step is completed
Execute the jdk1.8.0_131/bin/directory execution Java file:./java-version
5. Setting Environment variables
Vi/etc/profile
Join:
Export java_home=/xiaol/software/jdk1.8.0_131
Export JRE_HOME=/XIAOL/SOFTWARE/JDK1.8.0_131/JRE
Export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $JRE _home/bin: $PATH
6. Re-login detection
Any directory: java-version
Note: If you download the installation file jdk-8u131-linux-x64.rpm in RPM format, you only need to RPM-IVH JDK-8U131-LINUX-X64.RPM can be used, without going to the environment variables, RPM will help us manage, but RPM is not supported by every Linux
Linux installation JDK