在CentOS 6上安装EPEL源

前端之家收集整理的这篇文章主要介绍了在CentOS 6上安装EPEL源前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

EPEL 是什么?


EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/CentOS提供他们默认不提供的软件包。这个源兼容RHEL及像CentOS和Scientific Linux这样的衍生版本。



我们可以很容易地通过yum命令从EPEL源上获取上万个在CentOS自带源上没有的软件。EPEL提供的软件包大多基于其对应的Fedora软件包,不会与企业版Linux发行版本的软件发生冲突或替换其文件


更多关于EPEL 项目的细节可以到以下网站获取:https://fedoraproject.org/wiki/EPEL


在文本中,我将展示在CentOS下如何安装EPEL源(系统为centos 6.8 root用户)



在CentOS 上安装EPEL

要想安装EPEL,我们先要下载EPEL的rpm安装包。


CentOS/RHEL下的6.x和5.x版本下载页面如下


http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.htmlhttp://download.fedoraproject.org/pub/epel/5/i386/repoview/epel-release.html


以上网址可能会被重定向到特定的镜像站而加快下载速度。这个页面包含可以直接获取到rpm包的下载链接。直接的下载链接如下:


http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpmhttp://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm


根据你的CentOS 版本来选择正确的下载地址。


请注意EPEL 的安装包是独立编译的,所以它可以安装在32位和64位系统中。


1. 确认你的CentOS 的版本

首先通过以下命令确认你的CentOS 版本


$cat/etc/redhat-release
CentOSrelease6.8(Final)

2. 下载EPEL 的rpm 安装包

现在从上面的地址下载CentOS 版本所对应的EPEL 的版本

$wgethttp://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

3. 安装EPEL

通过以下命令安装EPEL 软件包

$rpm-ivhepel-release-6-8.noarch.rpm

5. 检查EPEL 源

安装好EPEL 源后,用yum 命令来检查是否添加到源列表

#yumrepolist
Loadedplugins:fastestmirror
Loadingmirrorspeedsfromcachedhostfile
*base:mirrors.vonline.vn
*epel:buaya.klas.or.id
*extras:centos-hn.viettelidc.com.vn
*updates:mirrors.fibo.vn
repoidreponamestatus
baseCentOS-6-Base6,381
epelExtraPackagesforEnterpriseLinux6-x86_6410,023
extrasCentOS-6-Extras13
NginxNginxrepo47
updatesCentOS-6-Updates1,555
repolist:18,019

EPEL已经在repo 后列出,并且显示提供了上万个软件包,所以EPEL 已经安装到你的CentOS了。


EPEL源的配置安装到了 /etc/yum.repos.d/epel.repo 文件


现在来试一下从EPEL 获取软件包

$yuminstalljava
yum-yinstalljava
Loadedplugins:fastestmirror,security
SettingupInstallProcess
Loadingmirrorspeedsfromcachedhostfile
*base:mirrors.aliyun.com
*epel:mirrors.tuna.tsinghua.edu.cn
*extras:mirrors.aliyun.com
*updates:mirrors.aliyun.com
ResolvingDependencies
-->Runningtransactioncheck
--->Packagejava-1.8.0-openjdk.x86_641:1.8.0.111-0.b15.el6_8willbeinstalled
-->ProcessingDependency:java-1.8.0-openjdk-headless=1:1.8.0.111-0.b15.el6_8forpackage:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64
-->ProcessingDependency:xorg-x11-fonts-Type1forpackage:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64
-->ProcessingDependency:libjvm.so(SUNWprivate_1.1)(64bit)forpackage:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64
-->ProcessingDependency:libjli.so(SUNWprivate_1.1)(64bit)forpackage:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64
-->ProcessingDependency:libjava.so(SUNWprivate_1.1)(64bit)forpackage:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64
-->ProcessingDependency:libjli.so()(64bit)forpackage:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64
-->ProcessingDependency:libjava.so()(64bit)forpackage:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64
-->ProcessingDependency:libgif.so.4()(64bit)forpackage:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64
-->ProcessingDependency:libawt.so()(64bit)forpackage:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64
-->Runningtransactioncheck
--->Packagegiflib.x86_640:4.1.6-3.1.el6willbeinstalled
--->Packagejava-1.8.0-openjdk-headless.x86_641:1.8.0.111-0.b15.el6_8willbeinstalled
-->ProcessingDependency:tzdata-java>=2014f-1forpackage:1:java-1.8.0-openjdk-headless-1.8.0.111-0.b15.el6_8.x86_64
-->ProcessingDependency:jpackage-utilsforpackage:1:java-1.8.0-openjdk-headless-1.8.0.111-0.b15.el6_8.x86_64
--->Packagexorg-x11-fonts-Type1.noarch0:7.2-11.el6willbeinstalled
-->ProcessingDependency:ttmkfdirforpackage:xorg-x11-fonts-Type1-7.2-11.el6.noarch
-->ProcessingDependency:ttmkfdirforpackage:xorg-x11-fonts-Type1-7.2-11.el6.noarch
-->ProcessingDependency:mkfontdirforpackage:xorg-x11-fonts-Type1-7.2-11.el6.noarch
-->ProcessingDependency:mkfontdirforpackage:xorg-x11-fonts-Type1-7.2-11.el6.noarch
-->Runningtransactioncheck
--->Packagejpackage-utils.noarch0:1.7.5-3.16.el6willbeinstalled
--->Packagettmkfdir.x86_640:3.0.9-32.1.el6willbeinstalled
--->Packagetzdata-java.noarch0:2016j-1.el6willbeinstalled
--->Packagexorg-x11-font-utils.x86_641:7.2-11.el6willbeinstalled
-->ProcessingDependency:libfontenc.so.1()(64bit)forpackage:1:xorg-x11-font-utils-7.2-11.el6.x86_64
-->ProcessingDependency:libXfont.so.1()(64bit)forpackage:1:xorg-x11-font-utils-7.2-11.el6.x86_64
-->Runningtransactioncheck
--->PackagelibXfont.x86_640:1.5.1-2.el6willbeinstalled
--->Packagelibfontenc.x86_640:1.1.2-3.el6willbeinstalled
-->FinishedDependencyResolution
DependenciesResolved
===========================================================================================================================
PackageArchVersionRepositorySize
===========================================================================================================================
Installing:
java-1.8.0-openjdkx86_641:1.8.0.111-0.b15.el6_8updates198k
Installingfordependencies:
giflibx86_644.1.6-3.1.el6base37k
java-1.8.0-openjdk-headlessx86_641:1.8.0.111-0.b15.el6_8updates32M
jpackage-utilsnoarch1.7.5-3.16.el6base60k
libXfontx86_641.5.1-2.el6base145k
libfontencx86_641.1.2-3.el6base29k
ttmkfdirx86_643.0.9-32.1.el6base43k
tzdata-javanoarch2016j-1.el6updates182k
xorg-x11-font-utilsx86_641:7.2-11.el6base75k
xorg-x11-fonts-Type1noarch7.2-11.el6base520k
TransactionSummary
===========================================================================================================================
Install10Package(s)
Totaldownloadsize:33M
Installedsize:105M
DownloadingPackages:
(1/10):giflib-4.1.6-3.1.el6.x86_64.rpm|37kB00:00
(2/10):java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_64.rpm|198kB00:00
(3/10):java-1.8.0-openjdk-headless-1.8.0.111-0.b15.el6_8.x86_64.rpm|32MB00:51
(4/10):jpackage-utils-1.7.5-3.16.el6.noarch.rpm|60kB00:00
(5/10):libXfont-1.5.1-2.el6.x86_64.rpm|145kB00:00
(6/10):libfontenc-1.1.2-3.el6.x86_64.rpm|29kB00:00
(7/10):ttmkfdir-3.0.9-32.1.el6.x86_64.rpm|43kB00:00
(8/10):tzdata-java-2016j-1.el6.noarch.rpm|182kB00:00
(9/10):xorg-x11-font-utils-7.2-11.el6.x86_64.rpm|75kB00:00
(10/10):xorg-x11-fonts-Type1-7.2-11.el6.noarch.rpm|520kB00:00
---------------------------------------------------------------------------------------------------------------------------
Total634kB/s|33MB00:53
Runningrpm_check_debug
RunningTransactionTest
TransactionTestSucceeded
RunningTransaction
Installing:libfontenc-1.1.2-3.el6.x86_641/10
Installing:libXfont-1.5.1-2.el6.x86_642/10
Installing:1:xorg-x11-font-utils-7.2-11.el6.x86_643/10
Installing:tzdata-java-2016j-1.el6.noarch4/10
Installing:jpackage-utils-1.7.5-3.16.el6.noarch5/10
Installing:1:java-1.8.0-openjdk-headless-1.8.0.111-0.b15.el6_8.x86_646/10
Installing:giflib-4.1.6-3.1.el6.x86_647/10
Installing:ttmkfdir-3.0.9-32.1.el6.x86_648/10
Installing:xorg-x11-fonts-Type1-7.2-11.el6.noarch9/10
Installing:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_6410/10
Verifying:ttmkfdir-3.0.9-32.1.el6.x86_641/10
Verifying:1:java-1.8.0-openjdk-headless-1.8.0.111-0.b15.el6_8.x86_642/10
Verifying:giflib-4.1.6-3.1.el6.x86_643/10
Verifying:jpackage-utils-1.7.5-3.16.el6.noarch4/10
Verifying:1:xorg-x11-font-utils-7.2-11.el6.x86_645/10
Verifying:1:java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_646/10
Verifying:libfontenc-1.1.2-3.el6.x86_647/10
Verifying:xorg-x11-fonts-Type1-7.2-11.el6.noarch8/10
Verifying:libXfont-1.5.1-2.el6.x86_649/10
Verifying:tzdata-java-2016j-1.el6.noarch10/10
Installed:
java-1.8.0-openjdk.x86_641:1.8.0.111-0.b15.el6_8
DependencyInstalled:
giflib.x86_640:4.1.6-3.1.el6java-1.8.0-openjdk-headless.x86_641:1.8.0.111-0.b15.el6_8
jpackage-utils.noarch0:1.7.5-3.16.el6libXfont.x86_640:1.5.1-2.el6
libfontenc.x86_640:1.1.2-3.el6ttmkfdir.x86_640:3.0.9-32.1.el6
tzdata-java.noarch0:2016j-1.el6xorg-x11-font-utils.x86_641:7.2-11.el6
xorg-x11-fonts-Type1.noarch0:7.2-11.el6
Complete!
原文链接:https://www.f2er.com/centos/379618.html

猜你在找的CentOS相关文章