Install jdk in centos 6.5 and jdk in centos

Source: Internet
Author: User

Install jdk in centos 6.5 and jdk in centos
Install jdk in linux

1. Download the linux jdk version:


2. Transfer the jdk file to the server/usr/local/jdk [the usr non-internal program and the program outside the command are installed in this directory] Directory,
[No jdk directory to create one: mkdir jdk] send the file here

3. Enter the usr/local/jdk directory and enter the command:

Sh jdk-6u1-linux-i586.bin

4. Configure jdk information: Enter the command vi/etc/profile and add the following configuration at the end to [etc stores the configuration file in the system]

JAVA_HOME =/usr/local/jdk/jdk1.6.0 _ 01
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export PATH

5. Go to the usr/bin directory and run the command. [switch to the default jdk version. Run the command: If the jdk is installed in linux, switch to your own version]
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. Enter
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 is complete ..........

You can directly configure it in tomact without having to configure it in etc/profile.

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

1) add the following two sentences (JDK) to the blank space at the beginning of the catalina. sh file and setclasspath. sh file ):

export JAVA_HOME=/usr/local/java/jdk1.6.0_18export JRE_HOME=/usr/local/java/jdk1.6.0_18/jre

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.