在CentOS下运行yum install flash-plugin或yum install mplayer的时候,提示库里没有找到这个软件?为什么会这样?因为CentOS是RHEL编译过来的,去掉了所有关于版权问题的东西。因此,在没有使用第三方软件库的情况下,很多软件无法用yum install来直接安装。

EPEL(Extra Packages for Enterprise Linux )软件库提供为 EL4 及 EL5 重新编译的 Fedora 组件。这个软件库在不替换系统组件方面下了功夫。在某些情况下它尝试直接针对 CentOS 兼容性的问题,但坚决否定软件库间的兼容性是目标之一。当它与其它第三方软件库混合使用时,问题可能会出现。故此,当你使用 EPEL 时,尤其是当你亦会运用其它件库的组件时,请确保你使用 yum 的 Priorities 插件。

种的CentOS的软件包,被CentOS社区认为是最安全也是最稳定的一个第三方软件库。

一、安装yum-priorities插件。

这个插件是用来设置yum在调用软件源时的顺序的。因为官方提供的软件源,都是比较稳定和被推荐使用的。因此,官方源的顺序要高于第三方源的顺序。如何保证这个顺序,就需要安装yum-priorities这插件了。

[root@CentOS ~]# yum install yum-priorities #安装yum-priorities

安装完后需要设置/etc/yum.repos.d/ 目录下的.repo相关文件(如CentOS-Base.repo),在这些文件中插入顺序指令:priority=N (N为1到99的正整数,数值越小越优先)

一般的配置是这样的:

[base], [addons], [updates], [extras] … priority=1
[CentOSplus],[contrib] … priority=2
其他第三的软件源为:priority=N (推荐N>10)

如我的CentOS-Base.repo配置为:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever – Base
mirrorlist=http://mirrorlist.CentOS.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.CentOS.org/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#released updates
[updates]
name=CentOS-$releasever – Updates
mirrorlist=http://mirrorlist.CentOS.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.CentOS.org/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever – Addons
mirrorlist=http://mirrorlist.CentOS.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.CentOS.org/CentOS/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
mirrorlist=http://mirrorlist.CentOS.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.CentOS.org/CentOS/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#additional packages that extend functionality of existing packages
[CentOSplus]
name=CentOS-$releasever – Plus
mirrorlist=http://mirrorlist.CentOS.org/?release=$releasever&arch=$basearch&repo=CentOSplus
#baseurl=http://mirror.CentOS.org/CentOS/$releasever/CentOSplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=2

#contrib – packages by CentOS Users
[contrib]
name=CentOS-$releasever – Contrib
mirrorlist=http://mirrorlist.CentOS.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.CentOS.org/CentOS/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=2

二、下载与安装相应EPEL的rpm文件包

1,下载与安装EPEL的rpm文件包

32位系统

[root@CentOS ~]# rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

64位系统

[root@CentOS ~]# rpm -ivh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

如果您不清楚您的系统内核,请使用 uname -a 命令来查看您的内核信息。

2,导入DAG的PGP Key

[root@CentOS ~]# rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

3,设置/etc/yum.repos.d/epel.repo文件中源的级别,就是添加priority=11这句。

如我的epel.repo文件内容:

[epel]
name=Extra Packages for Enterprise Linux 5 – $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
priority=11

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 5 – $basearch – Debug
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 5 – $basearch – Source
#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1

三、下载与安装相应rpmforge的rpm文件包

1,下载rpmforge的rpm文件包

32位系统

[root@CentOS ~]# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm

64位系统

[root@CentOS ~]# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

2,安装DAG的PGP Key

[root@CentOS ~]# rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

3,验证rpmforge的rpm文件包

[root@CentOS ~]# rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm

4,安装rpmforge的rpm文件包

[root@CentOS ~]# rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm

5,设置/etc/yum.repos.d/rpmforge.repo文件中源的级别,就是添加priority=12这句。

如我的rpmforge.repo文件内容:

### Name: RPMforge RPM Repository for Red Hat Enterprise 5 – dag
### URL: http://rpmforge.net/
[rpmforge]
name = Red Hat Enterprise $releasever – RPMforge.net – dag
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
priority=12

四、下载与安装相应rpmfusion的rpm文件包

(CentOS官方说这个软件库里面的软件稳定性不如rpmforge,选用!rpmfusion官方站:http://rpmfusion.org)

[root@CentOS ~]# rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm

[root@CentOS ~]# rpm -Uvh http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm

五、测试

1,测试升级

[root@CentOS ~]# yum check-update

输出信息应该会有以下两行:

Loading “priorities” plugin

XX packages excluded due to repository priority protections

2,安装下mplayer播放器试试,如果安装成功了就没有问题了。

[root@CentOS ~]# yum install mplayer

CentOS 如何使用第三方软件库-EPEL与RPMForge、RPMFusion软件库的更多相关文章

  1. CentOS6 yum源支持更多rpm包的升级(使用第三方软件库EPEL、RPMForge与RPMFusion)

    转载于http://blog.csdn.net/erazy0/article/details/6878153 在CentOS下运行yum install flash-plugin或yum instal ...

  2. 如何在CentOS 5/6上安装EPEL 源

    EPEL 是什么? EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/CentO ...

  3. 如何在CentOS 5/6上安装EPEL源

    EPEL 是什么? EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/CentO ...

  4. CentOS 5/6上安装EPEL源

    转自:http://www.vckai.com/p/25 EPEL 是什么? EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fe ...

  5. 如何在CentOS 6.5上安装EPEL 源

    EPEL 是什么? EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/CentO ...

  6. CentOS 5/6.X 使用 EPEL YUM源

    参考:http://www.linuxidc.com/Linux/2013-08/88523.htm 大纲 一.什么是EPEL? 二.与163 YUM源比较 三.CentOS 5.X 安装使用EPEL ...

  7. CentOS 7.4 下安装Epel源和Nginx

    EPEL (Extra Packages for Enterprise Linux)是基于Fedora的一个项目,为“红帽系”的操作系统提供额外的软件包,适用于RHEL.CentOS和Scientif ...

  8. 在CentOS上安装第三方软件库EPEL

    Extra Packages for Enterprise Linux (EPEL)[企业版 Linux 附加软件包(以下简称 EPEL)]是一个由特别兴趣小组创建.维护并管理的,针对 红帽企业版 L ...

  9. Centos6.0使用第三方YUM源(EPEL,RPMForge,RPMFusion)

    yum是centos下很方便的rpm包管理工具,配置第三方软件库使你的软件库更加丰富.以下简单的讲下配置的步骤. 首先,需要安装yum-priorities插件: yum install yum-pr ...

随机推荐

  1. Boost的安装与使用(整整83篇)

    http://www.cnblogs.com/lidabo/category/542245.html

  2. 几本不错的CPU设计以及VLSI的书籍

    1. Microprocessor Design Principales and Practrices with VHDL  特点:电路与VHDL一一对应,比较清楚,而且还用MAX+plus进行仿真 ...

  3. android使用xfire webservice框架远程对sqlserver操作(包括增删改查)的实例!!已在真机上试验通过

    前两天,公司有一个利用android远程操作sqlserver的项目,对此我是毫无头绪的,但也挺感兴趣的,于是开始上网搜索方法,网上有挺多方法了,发现使用webservice的挺多的,不过我对这些技术 ...

  4. JavaScript 进阶(一)JS的"多线程"

    这个系列的文章名为“JavaScript 进阶”,内容涉及JS中容易忽略但是很有用的,偏JS底层的,以及复杂项目中的JS的实践.主要来源于我几年的开发过程中遇到的问题.小弟第一次写博客,写的不好的地方 ...

  5. Swift - 给项目导入资源

    如果想添加资源到项目中去,只要通过鼠标左键将文件或者存有文件的文件夹直接拖到Xcode中.   当松开鼠标后会弹出如下面板: (1)勾上“Copy items if needed”就会拷贝文件进项目, ...

  6. Mysql 官方Memcached 插件初步试用感受 - schweigen - ITeye技术网站

    Mysql 官方Memcached 插件初步试用感受 - schweigen - ITeye技术网站 Mysql 官方Memcached 插件初步试用感受

  7. 使用iftop网络流量监控

    iftop这是一个非常有用的工具.下面的命令监视无线网卡在我的笔记本 iftop -i wlan0 比如,我现在玩音乐视频.iftop显示的信息: 基本说明: 1. 屏幕主要部分都是表示两个机器之间的 ...

  8. Swift - 使用表格组件(UITableView)实现分组列表

    1,样例说明: (1)列表以分组的形式展示 (2)同时还自定义分区的头部和尾部 (3)点击列表项会弹出消息框显示该项信息. 2,效果图:       3,代码如下: 1 2 3 4 5 6 7 8 9 ...

  9. CSS——inline-block属性

    Inline-block 是元素 display属性的一个值 .这个名字的由来是因为,可以简单的解释为inline+block :display设置这个值的元素,兼具行内元素( inline elem ...

  10. Codeforces 475D CGCDSSQ 求序列中连续数字的GCD=K的对数

    题目链接:点击打开链接 #include <cstdio> #include <cstring> #include <algorithm> #include < ...