method one:
In addition to this the following attached, there is a directly mounted via yum, this more convenient manner, the following installation jdk1.8 * Paste command:
After the above command completes, use the following command to see if the installation was successful:
Second way:
1. Download jdk
I am here under linux directory on disk after downloaded through the official online face from the window, downloaded.
Version: the JDK-8u181-Linux-x64.tar.gz
2, unzip the downloaded jdk
Create a folder:
Decompression (disk directory execute):
3, set the environment variable
Add the top of the file:
4, execution profile file
This allows the configuration to take effect immediately without restarting.