CentOS installation JDK-1.7, centosjdk-1.7

Source: Internet
Author: User

CentOS installation JDK-1.7, centosjdk-1.7

 

Note: All of the following operations are performed in the CentOS 6.5 x86_64-bit system.

 

# Preparations #

Before downloading with rpm, check whether the system has installed JDK. If not, go to the official installation step.

# rpm -qa | grep jdk

First of all need to download JDK-1.7, we choose to go to the official website to download. However, the downloading process is troublesome. The default download path cannot be downloaded directly using the wget command. The method is as follows:

1) Go to Oracle's official website, such as: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

2) Select Accept License Agreement as follows:

3) Click

At this time, the browser will download it, copy the official address downloaded by the browser, and then use wget to obtain it, for example:

# Cd/usr/local/src # wget http://download.oracle.com/otn-pub/java/jdk/7u72-b14/jdk-7u72-linux-x64.rpm? AuthParam = 1419939909_a8de536de423ecfac6886b3bf6567c0e ...... 19:50:35 (292 KB/s)-saved "jdk-7u72-linux-x64.rpm? AuthParam = 1419939909_a8de536de423ecfac6886b3bf6567c0e "[126699825/126699825]) # ls/usr/local/srcjdk-7u72-linux-x64.rpm? AuthParam = 1419939909_a8de536de423ecfac6886b3bf6567c0e # Music jdk-7u72-linux-x64.rpm? AuthParam = 1419939909_a8de536de423ecfac6886b3bf6567c0e jdk-7u72-linux-x64.rpm

 

# Installation of JDK-1.7 #

Install the downloaded JDK-1.7:

# cd /usr/local/src# rpm -Uvh jdk-7u72-linux-x64.rpmPreparing...                ########################################### [100%]   1:jdk                    ########################################### [100%]Unpacking JAR files...     rt.jar...     jsse.jar...     charsets.jar...     tools.jar...     localedata.jar...     jfxrt.jar...# rpm -qa | grep jdkjdk-1.7.0_72-fcs.x86_64

The default JDK installation path is/usr/java:

# ls /usr/java/default  jdk1.7.0_72  latest

Add the JAVA bin directory to the current environment:

# vim /etc/profileexport JAVA_HOME=/usr/java/jdk1.7.0_72export PATH=$PATH:/usr/local/mysql/bin:$JAVA_HOME/bin# source /etc/profile

So far, the JDK environment has been installed.

 

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.