This article chooses to install JDK1 in RedHat6 on vmwarevirtual machine) download JDK brother download is jdk-6u20-linux-i586.bin, you can download other versions on the official website. Copy the file jdk-6u20-linux-i586.bin to the opt directory and place it in another directory. 2) extract the file jdk-6u20-linux-i586.bin in the terminal input: [root @ bogonopt] #./jdk-6u2
This article selects to install JDK in RedHat6 on vmwarevm
1) download JDK
Brother download is jdk-6u20-linux-i586.bin, you can go to the official website to download other versions.
Copy the file jdk-6u20-linux-i586.bin to the opt directory and place it in another directory.
2) unzip the file jdk-6u20-linux-i586.bin
Enter:
[Root @ bogon opt] #./jdk-6u20-linux-i586.bin
You can extract the file jdk-6u20-linux-i586.bin to the folder jdk1.6.0 _ 20
3) Configure Environment Variables
Edit the. bashrc or. profile file in the user directory. Edit the/etc/profile file if you want to take effect in shell of all users. The following content is also added:
Export JAVA_HOME =/opt/jdk1.6.0 _ 20
Export JRE_HOME =/opt/jdk1.6.0 _ 20/jre
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH
Run the following command:
[Root @ bogon opt] # source/etc/profile
4) Verify that JDK is successfully installed
Terminal input command: java-version
[Root @ bogon etc] # java-version
Java version "1.6.0 _ 20"
Java (TM) SE Runtime Environment (build 1.6.0 _ 20-b02)
Java HotSpot (TM) Client VM (build 16.3-b01, mixed mode, sharing)
Indicates that JDK is successfully installed.
Recommended reading:
CentOS installation configuration JDK and Tomcat support jsp file parsing http://www.linuxidc.com/Linux/2013-09/89644.htm
JDK 1.7 installation details (CentOS 6.4) http://www.linuxidc.com/Linux/2013-07/87845.htm
Configure JDK environment variable http://www.linuxidc.com/Linux/2013-06/85733.htm in Ubuntu 13.04
Ubuntu 12.04 LTS install sun JDK7 http://www.linuxidc.com/Linux/2013-06/86343.htm
Http://www.linuxidc.com/Linux/2013-05/84277.htm for Virtual Machine JDK and tomcat installation
Ubuntu installation JDK + Eclipse + Tomcat configuration environment http://www.linuxidc.com/Linux/2013-04/82213.htm
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10