CentOS installation JDK

Source: Internet
Author: User

Recently, the use of Linux system, so the newly installed a virtual machine and CentOS 6.4来, the development of the program apes may know that in many enterprises today, the production environment is mostly Linux servers, and used more mostly centos,red Hat Series Linux system environment, below I will use my current installation of CentOS 6.4来 to illustrate the installation of the JDK 1.7.0_75 version of the operation process, as described below:

First: Download the JDK corresponding to the CentOS version: Here i download the jdk-7u75-linux-x64.tar.gz, for: http://www.oracle.com/technetwork/java/javase/ Downloads/jdk7-downloads-1880260.html

Two: Download the JDK locally and upload it to your CentOS 6.4 system server

Three: Before installing your own downloaded JDK, first look at the new installation of the CentOS 6.4 system comes with the JDK version, if there is best to uninstall, and then install their own downloaded JDK version, how to uninstall the Linux system comes with many examples of JDK online, I believe everyone will operate.

Four: Unzip just downloaded: jdk-7u75-linux-x64.tar.gz package, the command is as follows:

Tar xvf jdk-7u75-linux-x64.tar.gz

Five: After the decompression is complete, go to:

[[Email protected]~]# cd/etc

[Email protected] etc]# VI profile

At the end of the profile file, add the following command:

Export java_home=/usr/local/java/jdk1.7.0_75

Export JRE_HOME=/USR/LOCAL/JAVA/JDK1.7.0_75/JRE

Export path= $PATH:/usr/local/java/jdk1.7.0_75/bin

Export Classpath=./:/usr/local/java/jdk1.7.0_75/lib:/usr/local/java/jdk1.7.0_75/jre/lib

Input: Wq save and exit before restarting the CentOS 6.4 system

Seven: After restarting the system, enter: Java-version, if you see the following instructions your JDK has been installed successfully.

CentOS installation JDK

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.