1. See if Linux has Java installed
Java (or) java-version
If there is an installation required to perform step two & third, no fourth step is performed.
2. View JAK information
Rpm-qa | grep java
3. Uninstall the installed Java
Yum-y Remove Javaxxxxx (the Java RPM package looked up in the second step)
4. Installing the JDK
Create a Java under/usr and install the Java program in this directory
Mkdir/usr/java
5, will download the good installation file into/usr/java jdkxxxxxxxxxxx.gz
6. Unzip GZ
TAR-ZXVF jdkxxxxxxxxxxx.gz
7. Delete jdkxxxxx.gz
8. Configure Environment variables
Vim/etc/profile
Export PATH USER LOGNAME MAIL HOSTNAME histsize Histcontrol
Export java_home=/usr/java/jdk1.7.0_60
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
9, execute the configuration file, make it effective immediately
Source/etc/profile
10. Verify that Java is installed successfully
Java-version
Linux Java Configuration