在CentOS系统上安装Java的openjdk的方法
程序员文章站
2024-03-05 13:33:54
centos 6.x 和 5.x 自带有openjdk runtime environment (openjdk)。它是一个在linux上实现开源的java 平...
centos 6.x 和 5.x 自带有openjdk runtime environment (openjdk)。它是一个在linux上实现开源的java 平台。centos yum 命令 安装 java sdk openjdk
centos linux java(openjdk)软件包名
1.java-1.7.0-openjdk - openjdk runtime environment
2.java-1.7.0-openjdk-devel - openjdk development environment
输入以下命令,以查看可用的jdk软件包列表;
[root@dabu.info ~]# yum search java | grep -i --color jdk
输出类似下图:
centos-openjdk
在centos linux安装 java sdk
在命令行终端以root用户 输入以下命令yum安装 opensdk :
[root@dabu.info ~]#yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel #安装openjdk
输出如下:
loaded plugins: downloadonly, fastestmirror, security loading mirror speeds from cached hostfile * base: mirror.wiredtree.com * epel: mirror.steadfast.net * extras: bay.uchicago.edu * updates: mirror.team-cymru.org setting up install process resolving dependencies --> running transaction check ---> package java-1.7.0-openjdk.x86_64 1:1.7.0.51-2.4.4.1.el6_5 will be installed --> processing dependency: jpackage-utils >= 1.7.3-1jpp.2 for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: xorg-x11-fonts-type1 for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: tzdata-java for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: rhino for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: libpulse.so.0(pulse_0)(64bit) for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: libasound.so.2(alsa_0.9.0rc4)(64bit) for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: libasound.so.2(alsa_0.9)(64bit) for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: libpulse.so.0()(64bit) for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: libgif.so.4()(64bit) for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: libasound.so.2()(64bit) for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> processing dependency: libxtst.so.6()(64bit) for package: 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 --> running transaction check ---> package alsa-lib.x86_64 0:1.0.22-3.el6 will be installed ---> package giflib.x86_64 0:4.1.6-3.1.el6 will be installed --> processing dependency: libsm.so.6()(64bit) for package: giflib-4.1.6-3.1.el6.x86_64 --> processing dependency: libice.so.6()(64bit) for package: giflib-4.1.6-3.1.el6.x86_64 ---> package jpackage-utils.noarch 0:1.7.5-3.12.el6 will be installed ---> package libxtst.x86_64 0:1.2.1-2.el6 will be installed ---> package pulseaudio-libs.x86_64 0:0.9.21-14.el6_3 will be installed --> processing dependency: libsndfile.so.1(libsndfile.so.1.0)(64bit) for package: pulseaudio-libs-0.9.21-14.el6_3.x86_64 --> processing dependency: libsndfile.so.1()(64bit) for package: pulseaudio-libs-0.9.21-14.el6_3.x86_64 --> processing dependency: libasyncns.so.0()(64bit) for package: pulseaudio-libs-0.9.21-14.el6_3.x86_64 ---> 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 ---> package tzdata-java.noarch 0:2013i-2.el6 will be installed ---> package xorg-x11-fonts-type1.noarch 0:7.2-9.1.el6 will be installed --> processing dependency: ttmkfdir for package: xorg-x11-fonts-type1-7.2-9.1.el6.noarch --> processing dependency: ttmkfdir for package: xorg-x11-fonts-type1-7.2-9.1.el6.noarch --> processing dependency: mkfontdir for package: xorg-x11-fonts-type1-7.2-9.1.el6.noarch --> processing dependency: mkfontdir for package: xorg-x11-fonts-type1-7.2-9.1.el6.noarch --> running transaction check ---> package jline.noarch 0:0.9.94-0.8.el6 will be installed ---> package libice.x86_64 0:1.0.6-1.el6 will be installed ---> package libsm.x86_64 0:1.2.1-2.el6 will be installed ---> package libasyncns.x86_64 0:0.8-1.1.el6 will be installed ---> package libsndfile.x86_64 0:1.0.20-5.el6 will be installed --> processing dependency: libvorbisenc.so.2()(64bit) for package: libsndfile-1.0.20-5.el6.x86_64 --> processing dependency: libvorbis.so.0()(64bit) for package: libsndfile-1.0.20-5.el6.x86_64 --> processing dependency: libogg.so.0()(64bit) for package: libsndfile-1.0.20-5.el6.x86_64 --> processing dependency: libflac.so.8()(64bit) for package: libsndfile-1.0.20-5.el6.x86_64 ---> package ttmkfdir.x86_64 0:3.0.9-32.1.el6 will be installed ---> package xorg-x11-font-utils.x86_64 1:7.2-11.el6 will be installed --> processing dependency: libfontenc.so.1()(64bit) for package: 1:xorg-x11-font-utils-7.2-11.el6.x86_64 --> processing dependency: libxfont.so.1()(64bit) for package: 1:xorg-x11-font-utils-7.2-11.el6.x86_64 --> running transaction check ---> package flac.x86_64 0:1.2.1-6.1.el6 will be installed ---> package libxfont.x86_64 0:1.4.5-3.el6_5 will be installed ---> package libfontenc.x86_64 0:1.0.5-2.el6 will be installed ---> package libogg.x86_64 2:1.1.4-2.1.el6 will be installed ---> package libvorbis.x86_64 1:1.2.3-4.el6_2.1 will be installed --> finished dependency resolution dependencies resolved ================================================================================================== package arch version repository size ================================================================================================== installing: java-1.7.0-openjdk x86_64 1:1.7.0.51-2.4.4.1.el6_5 updates 26 m installing for dependencies: alsa-lib x86_64 1.0.22-3.el6 base 370 k flac x86_64 1.2.1-6.1.el6 base 243 k giflib x86_64 4.1.6-3.1.el6 base 37 k jline noarch 0.9.94-0.8.el6 base 86 k jpackage-utils noarch 1.7.5-3.12.el6 base 59 k libice x86_64 1.0.6-1.el6 base 53 k libsm x86_64 1.2.1-2.el6 base 37 k libxfont x86_64 1.4.5-3.el6_5 updates 136 k libxtst x86_64 1.2.1-2.el6 base 29 k libasyncns x86_64 0.8-1.1.el6 base 24 k libfontenc x86_64 1.0.5-2.el6 base 24 k libogg x86_64 2:1.1.4-2.1.el6 base 21 k libsndfile x86_64 1.0.20-5.el6 base 233 k libvorbis x86_64 1:1.2.3-4.el6_2.1 base 168 k pulseaudio-libs x86_64 0.9.21-14.el6_3 base 462 k rhino noarch 1.7-0.7.r2.2.el6 base 778 k ttmkfdir x86_64 3.0.9-32.1.el6 base 43 k tzdata-java noarch 2013i-2.el6 updates 147 k xorg-x11-font-utils x86_64 1:7.2-11.el6 base 75 k xorg-x11-fonts-type1 noarch 7.2-9.1.el6 base 520 k transaction summary ================================================================================================== install 21 package(s) total download size: 29 m installed size: 100 m is this ok [y/n]: y downloading packages: (1/21): alsa-lib-1.0.22-3.el6.x86_64.rpm | 370 kb 00:00 (2/21): flac-1.2.1-6.1.el6.x86_64.rpm | 243 kb 00:00 (3/21): giflib-4.1.6-3.1.el6.x86_64.rpm | 37 kb 00:00 (4/21): java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64.rpm | 26 mb 00:02 (5/21): jline-0.9.94-0.8.el6.noarch.rpm | 86 kb 00:00 (6/21): jpackage-utils-1.7.5-3.12.el6.noarch.rpm | 59 kb 00:00 (7/21): libice-1.0.6-1.el6.x86_64.rpm | 53 kb 00:00 (8/21): libsm-1.2.1-2.el6.x86_64.rpm | 37 kb 00:00 (9/21): libxfont-1.4.5-3.el6_5.x86_64.rpm | 136 kb 00:00 (10/21): libxtst-1.2.1-2.el6.x86_64.rpm | 29 kb 00:00 (11/21): libasyncns-0.8-1.1.el6.x86_64.rpm | 24 kb 00:00 (12/21): libfontenc-1.0.5-2.el6.x86_64.rpm | 24 kb 00:00 (13/21): libogg-1.1.4-2.1.el6.x86_64.rpm | 21 kb 00:00 (14/21): libsndfile-1.0.20-5.el6.x86_64.rpm | 233 kb 00:00 (15/21): libvorbis-1.2.3-4.el6_2.1.x86_64.rpm | 168 kb 00:00 (16/21): pulseaudio-libs-0.9.21-14.el6_3.x86_64.rpm | 462 kb 00:00 (17/21): rhino-1.7-0.7.r2.2.el6.noarch.rpm | 778 kb 00:00 (18/21): ttmkfdir-3.0.9-32.1.el6.x86_64.rpm | 43 kb 00:00 (19/21): tzdata-java-2013i-2.el6.noarch.rpm | 147 kb 00:00 (20/21): xorg-x11-font-utils-7.2-11.el6.x86_64.rpm | 75 kb 00:00 (21/21): xorg-x11-fonts-type1-7.2-9.1.el6.noarch.rpm | 520 kb 00:00 -------------------------------------------------------------------------------------------------- total 7.2 mb/s | 29 mb 00:04 running rpm_check_debug running transaction test transaction test succeeded running transaction installing : libice-1.0.6-1.el6.x86_64 1/21 installing : 2:libogg-1.1.4-2.1.el6.x86_64 2/21 installing : libsm-1.2.1-2.el6.x86_64 3/21 installing : libxtst-1.2.1-2.el6.x86_64 4/21 installing : jpackage-utils-1.7.5-3.12.el6.noarch 5/21 installing : alsa-lib-1.0.22-3.el6.x86_64 6/21 installing : libfontenc-1.0.5-2.el6.x86_64 7/21 installing : libxfont-1.4.5-3.el6_5.x86_64 8/21 installing : 1:xorg-x11-font-utils-7.2-11.el6.x86_64 9/21 installing : giflib-4.1.6-3.1.el6.x86_64 10/21 installing : flac-1.2.1-6.1.el6.x86_64 11/21 installing : 1:libvorbis-1.2.3-4.el6_2.1.x86_64 12/21 installing : libsndfile-1.0.20-5.el6.x86_64 13/21 installing : libasyncns-0.8-1.1.el6.x86_64 14/21 installing : pulseaudio-libs-0.9.21-14.el6_3.x86_64 15/21 installing : jline-0.9.94-0.8.el6.noarch 16/21 installing : rhino-1.7-0.7.r2.2.el6.noarch 17/21 installing : tzdata-java-2013i-2.el6.noarch 18/21 installing : ttmkfdir-3.0.9-32.1.el6.x86_64 19/21 installing : xorg-x11-fonts-type1-7.2-9.1.el6.noarch 20/21 installing : 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 21/21 verifying : pulseaudio-libs-0.9.21-14.el6_3.x86_64 1/21 verifying : ttmkfdir-3.0.9-32.1.el6.x86_64 2/21 verifying : tzdata-java-2013i-2.el6.noarch 3/21 verifying : libxfont-1.4.5-3.el6_5.x86_64 4/21 verifying : libfontenc-1.0.5-2.el6.x86_64 5/21 verifying : flac-1.2.1-6.1.el6.x86_64 6/21 verifying : jline-0.9.94-0.8.el6.noarch 7/21 verifying : alsa-lib-1.0.22-3.el6.x86_64 8/21 verifying : 2:libogg-1.1.4-2.1.el6.x86_64 9/21 verifying : 1:libvorbis-1.2.3-4.el6_2.1.x86_64 10/21 verifying : 1:xorg-x11-font-utils-7.2-11.el6.x86_64 11/21 verifying : xorg-x11-fonts-type1-7.2-9.1.el6.noarch 12/21 verifying : libsm-1.2.1-2.el6.x86_64 13/21 verifying : libice-1.0.6-1.el6.x86_64 14/21 verifying : 1:java-1.7.0-openjdk-1.7.0.51-2.4.4.1.el6_5.x86_64 15/21 verifying : rhino-1.7-0.7.r2.2.el6.noarch 16/21 verifying : libasyncns-0.8-1.1.el6.x86_64 17/21 verifying : giflib-4.1.6-3.1.el6.x86_64 18/21 verifying : libsndfile-1.0.20-5.el6.x86_64 19/21 verifying : jpackage-utils-1.7.5-3.12.el6.noarch 20/21 verifying : libxtst-1.2.1-2.el6.x86_64 21/21 installed: java-1.7.0-openjdk.x86_64 1:1.7.0.51-2.4.4.1.el6_5 dependency installed: alsa-lib.x86_64 0:1.0.22-3.el6 flac.x86_64 0:1.2.1-6.1.el6 giflib.x86_64 0:4.1.6-3.1.el6 jline.noarch 0:0.9.94-0.8.el6 jpackage-utils.noarch 0:1.7.5-3.12.el6 libice.x86_64 0:1.0.6-1.el6 libsm.x86_64 0:1.2.1-2.el6 libxfont.x86_64 0:1.4.5-3.el6_5 libxtst.x86_64 0:1.2.1-2.el6 libasyncns.x86_64 0:0.8-1.1.el6 libfontenc.x86_64 0:1.0.5-2.el6 libogg.x86_64 2:1.1.4-2.1.el6 libsndfile.x86_64 0:1.0.20-5.el6 libvorbis.x86_64 1:1.2.3-4.el6_2.1 pulseaudio-libs.x86_64 0:0.9.21-14.el6_3 rhino.noarch 0:1.7-0.7.r2.2.el6 ttmkfdir.x86_64 0:3.0.9-32.1.el6 tzdata-java.noarch 0:2013i-2.el6 xorg-x11-font-utils.x86_64 1:7.2-11.el6 xorg-x11-fonts-type1.noarch 0:7.2-9.1.el6
complete!
下一篇: 获取ashx得到的内容(已处理好的数据)
推荐阅读
-
在CentOS系统上安装Java的openjdk的方法
-
在CentOS系统中检测Java安装及运行jar应用的方法
-
在Window系统下安装Netbeans9的方法
-
在CentOS系统中检测Java安装及运行jar应用的方法
-
在CentOS系统上安装Java的openjdk的方法
-
在CentOS上配置Java环境变量的教程
-
在Windows系统下安装Thrift的方法与使用讲解
-
Centos系统Samtools的安装方法
-
在Windows系统下安装Thrift的方法与使用讲解
-
linux服务器上安装jdk的两种方法(yum+下载包)(转载) 博客分类: linux 相关JAVA基础知识 linuxjdkyum