Install java and javac on CentOS (java Runtime Environment and Development Environment)

Source: Internet
Author: User
Tags aliyun

[Root @ localhost usr] # yum install java
Loaded plugins: fastestmirror, refresh-packagekit, security
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* Base: mirrors.btte.net
* Extras: mirrors.btte.net
* Updates: mirrors.btte.net
Setting up Install Process
Package 1: java-1.7.0-openjdk-1.7.0.55-2.4.7.1.el6_5.x86_64 already installed and latest version
Nothing to do
[Root @ localhost usr] # yum search jdk
Loaded plugins: fastestmirror, refresh-packagekit, security
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* Base: mirrors.btte.net
* Extras: mirrors.btte.net
* Updates: mirrors.btte.net
================================== N/S Matched: jdk ==================================
Java-1.6.0-openjdk.x86_64: OpenJDK Runtime Environment
Java-1.6.0-openjdk-demo.x86_64: OpenJDK Demos
Java-1.6.0-openjdk-devel.x86_64: OpenJDK Development Environment
Java-1.6.0-openjdk-javadoc.x86_64: OpenJDK API Documentation
Java-1.6.0-openjdk-src.x86_64: OpenJDK Source Bundle
Java-1.7.0-openjdk.x86_64: OpenJDK Runtime Environment
Java-1.7.0-openjdk-demo.x86_64: OpenJDK Demos
Java-1.7.0-openjdk-devel.x86_64: OpenJDK Development Environment
Java-1.7.0-openjdk-javadoc.noarch: OpenJDK API Documentation
Java-1.7.0-openjdk-src.x86_64: OpenJDK Source Bundle
Ldapjdk-javadoc.x86_64: Javadoc for ldapjdk.
Icedtea-web.x86_64: Additional Java components for OpenJDK-Java browser
: Plug-in and Web Start implementation
Ldapjdk. x86_64: The Mozilla LDAP Java SDK


Name and summary matches only, use "search all" for everything.
[Root @ localhost usr] # yum install java * jdk * devel * Unknown name can use wildcards
Loaded plugins: fastestmirror, refresh-packagekit, security
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* Base: mirrors.btte.net
* Extras: mirrors.btte.net
* Updates: mirrors.btte.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.6.0-openjdk-devel.x86_64 1:1. 6.0.0-5.1.13.3.el6 _ 5 will be installed
--> Processing Dependency: java-1.6.0-openjdk =. 6.0.0-5.1.13.3.el6 _ 5 for package: 1: java-1.6.0-openjdk-devel-1.6.0.0-5.1.13.3.el6_5.x86_64
---> Package java-1.7.0-openjdk-devel.x86_64. 7.0.55-2.4.7.1.el6 _ 5 will be installed
--> Running transaction check
---> Package java-1.6.0-openjdk.x86_64 1:1. 6.0.0-5.1.13.3.el6 _ 5 will be installed
--> Processing Dependency: rhino for package: 1: java-1.6.0-openjdk-1.6.0.0-5.1.13.3.el6_5.x86_64
--> Running transaction check
---> Package rhino. noarch 0:1. 7-0.7.r2.2.el6 will be installed
--> Processing Dependency: jline for package: rhino-1.7-0.7.r2.2.el6.noarch
--> Running transaction check
---> Package jline. noarch 0: 0. 9.94-0.8.el6 will be installed
--> Finished Dependency Resolution


Dependencies Resolved


========================================================== ==========================================================
Package Arch Version Repository
Size
========================================================== ==========================================================
Installing:
Java-1.6.0-openjdk-devel x86_64 1:1. 6.0.0-5.1.13.3.el6 _ 5 updates 15 M
Java-1.7.0-openjdk-devel x86_64. 7.0.55-2.4.7.1.el6 _ 5 updates 9.4 M
Installing for dependencies:
Java-1.6.0-openjdk x86_64 1:1. 6.0.0-5.1.13.3.el6 _ 5 updates 41 M
Jline noarch 0.9.94-0.8.el6 base 86 k
Rhino noarch 1.7-0.7.r2.2.el6 base 778 k


Transaction Summary
========================================================== ==========================================================
Install 5 Package (s)


Total download size: 66 M
Installed size: 132 M
Is this OK [y/N]: n here list two jdk that match the wildcard, so I do not install two
Exiting on user Command
[Root @ localhost usr] # yum install java-1.7.0-openjdk-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* Base: pai.esocc.com
* Extras: mirrors.aliyun.com
* Updates: mirrors.aliyun.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.7.0-openjdk-devel.x86_64. 7.0.55-2.4.7.1.el6 _ 5 will be installed
--> Finished Dependency Resolution


Dependencies Resolved


========================================================== ==========================================================
Package Arch Version Repository
Size
========================================================== ==========================================================
Installing:
Java-1.7.0-openjdk-devel x86_64. 7.0.55-2.4.7.1.el6 _ 5 updates 9.4 M


Transaction Summary
========================================================== ==========================================================
Install 1 Package (s)


Total download size: 9.4 M
Installed size: 36 M
Is this OK [y/N]: y
Downloading Packages:
Java-1.7.0-openjdk-devel-1.7.0.55-2.4.7.1.el6_5.x86_64.r | 9.4 MB
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: 1: java-1.7.0-openjdk-devel-1.7.0.55-2.4.7.1.el6_5.x86_64 1/1
Verifying: 1: java-1.7.0-openjdk-devel-1.7.0.55-2.4.7.1.el6_5.x86_64 1/1


Installed:
Java-1.7.0-openjdk-devel.x86_64. 7.0.55-2.4.7.1.el6 _ 5


Complete!
[Root @ localhost usr] #

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.