Install Java on RHEL6 uninstall older versions of Java # java-version # rpm-qa | grepjava # rpm-e -- nodepsjava-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64bin installation # chmoda + xjdk-6u31-linux-x64.bin # cd/opt/# mkdirjava # cdjava #/home
Install Java on RHEL6
Uninstall old Java versions
# Java-version
# Rpm-qa | grep java
# Rpm-e -- nodeps java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
Bin Installation
# Chmod a + x jdk-6u31-linux-x64.bin
# Cd/opt/
# Mkdir java
# Cd java
#/Home/bati/Downloads/jdk-6u31-linux-x64.bin
Java (TM) SE Development Kit 6 successfully installed.
......
Press Enter to continue .....
Done.
Install it to the directory where the bin file is executed.
Rpm Installation
# Chmod a + x jdk-6u31-linux-x64-rpm.bin
#./Jdk-6u31-linux-x64-rpm.bin
Installed in/usr/java
Configure Environment Variables
# Vim/etc/profile
Add the following content
Export JAVA_HOME =/usr/java/jdk1.6.0 _ 31
Export PATH = $ JAVA_HOME/bin: $ PATH
Effective immediately:
# Source/etc/profile
# Java-version
Install JDK 7 (with Clojure download) http://www.linuxidc.com/Linux/2012-10/71557.htm under Ubuntu
Install JDK1.7 http://www.linuxidc.com/Linux/2012-06/62239.htm in Ubuntu 12.04
Ubuntu 14.04 LTS install Oracle JDK 1.8 http://www.linuxidc.com/Linux/2014-11/109216.htm
CentOS6.3 install JDK and environment configuration http://www.linuxidc.com/Linux/2012-09/70780.htm
Ubuntu 14.04 install JDK8 http://www.linuxidc.com/Linux/2014-09/106218.htm
Install JDK graph analysis http://www.linuxidc.com/Linux/2014-09/107291.htm under Ubuntu
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-02/112907.htm