Installing JDK under CentOS 6.5

Source: Internet
Author: User

Linux System Installation JDK


1. Download the Linux JDK version:


jdk-6u1-linux-i586




2. Transfer the JDK files to the server/usr/local/jdk "USR non-internal programs, commands outside the program are installed in this directory" directory,
"No JDK directory created: mkdir jdk" Send the file here




3. Enter the USR/LOCAL/JDK directory input command:


SH jdk-6u1-linux-i586.bin






4, configure the JDK information: Enter the command vi/etc/profile at the end of the following configuration can be "etc Storage System configuration File"


Java_home=/usr/local/jdk/jdk1.6.0_01
Path= $JAVA _home/bin: $PATH
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export Java_home
Export PATH
Export CLASSPATH






5. Go to the Usr/bin directory to "toggle the default JDK version execution: Fear of having the JDK installed after Linux installation so switch to your own installation"
Cd/usr/bin
Ln-s-F/USR/LOCAL/JDK/jdk1.6.0_01/jre/bin/java
Ln-s-F/USR/LOCAL/JDK/jdk1.6.0_01/bin/javac






6. At the command line, enter
Java-version
Screen output:


Java Version "jdk1.6.0_01"
Java (TM) 2 Runtime environment, Standard Edition (build jdk1.6.0_01)
Java HotSpot (TM) Client VM (build jdk1.6.0_01, Mixed mode)


Installation complete .....


Can be configured directly in Tomact without any further etc/profile

Modify Tomcat three configuration files, "tomcat/bin/catalina.sh", "tomcat/bin/setclasspath.sh".

1) Add the following two sentences (specify JDK) in the blanks at the beginning of the catalina.sh file and the setclasspath.sh file:

Export Java_home=/usr/local/java/jdk1.6.0_18export Jre_home=/usr/local/java/jdk1.6.0_18/jre

Installing JDK under CentOS 6.5

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.