First step: Install the JDK; First check if the OPENJDK is present enter the following command
Java-version
If present, enter
Rpm-qa | grep java
Or
Rpm-qa | grep JDK
Xxxx_openjdk_xxx and other related information, copy one of the
Uninstall OPENJDK Enter the following command rpm-e--nodeps the JDK file name that you copied in the previous step
Or
Yum-y Remove the JDK file name from the previous step of the Java copy
Wait for the execution to complete repeat this step to replace the file name
Step two: Download the JDK
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Step three: Unzip
Fourth Step: Configure environment variables
vim/etc/profile.d/java.sh
Java_home=/software/jdk1.7.0_79class_path=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jarpath= $JAVA _home/bin: $PATHexport java_home Class_path PATH
source/etc/profile.d/java.sh
Centos7 Installing Java