Install java jdk in CentOS 6.5

Source: Internet
Author: User

Install java jdk in CentOS 6.5
1. install java jdk using CentOS Method 1: directly install it using rpm

Go to the official website to download

[Html] view plaincopyprint?
  1. Http://www.oracle.com/technetwork/java/javase/downloads/index.html


Select RPM to download the file. My choice is 64-bit.

[Php] view plaincopyprint?
  1. Jdk-8u5-linux-x64.rpm

Then run the command to install it directly (the yum execution is *. rpm in the current directory)

[Html] view plaincopyprint?
  1. Yuminstalljdk-8u5-linux-x64.rpm
Method 2: Install openJDK

[Html] view plaincopyprint?
  1. Yumlist | grepopenj # View Software Installation

[Html] view plaincopyprint?
  1. Yuminstalljava-1.7.0-openjdk

2. install java jdk in Ubuntu Method 1: Install OpenJDK

[Html] view plaincopyprint?
  1. Sudoapt-getinstallopenjdk-7-jdk

This can be directly installed, or you can directly query the installation.

[Php] view plaincopyprint?
  1. Sudoapt-getinstallopenjdk and press the TAB key. The program automatically searches for software that starts with openjdk.
[Html] view plaincopyprint?
  1. The program will output Displayall311possibilities? (Yorn), Press y to list the software


Enter the following information to start installation.

[Html] view plaincopyprint?
  1. Sudoapt-getinstallopenjdk-7-jdk

Method 2: rpm installation and download

In the debian system, the rpm format cannot be directly installed. You must use alien to convert the format to the deb format.

Install

[Html] view plaincopyprint?
  1. Sudoapt-getinstallalien

Then, convert the format to install.

[Html] view plaincopyprint?
  1. Alien-ijdk-8u5-linux-x64.rpm # Install directly, this time is too long, first convert to DEB package, then install

Or convert to DEB and install

[Html] view plaincopyprint?
  1. Alien-djdk-8u5-linux-x64.rpm # generate Debian package

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.