RPMforge 是 Dag、Dries 和其它软件包的组合。它们为 CentOS 提供了超过 4000 个软件包,包括 mplayer、xmms-mp3 和其它流行的媒体播放工具。RPMforge 不是红帽子 Linux 产品或 CentOS 的组成部分,但它是为这些 Linux 套件而设计的。

注释:因为这个安装源不是 CentOS 本身的组成部分,所以有关技术支持的问题应当向 RPMforge 的维护者发送。

RPMforge 软件包以 rpm 格式提供,并且一般都是可用的。必需注意,有一些包比 CentOS 官方提供的版本要新,所以你不应当盲目地安装。在升级代替 CentOS 官方提供的软件包之前,你应当确保不要破坏任何重要的东西。虽然大多数情况下你可以改正任何错误,但最好还是避免类似的情况发生。

在 CentOS 5.0 下的使用

如果你打算应用这个软件仓库,你可能希望安装 Priorities,因为 RPMforge 里的一些包比它在 ContOS 里的对应的包的版本要新。

下面的注释显示了 yum 的维护者的感想。但是,从实践的观点来看,如果你希望使用 RPMforge 安装源,你就没有办法避免这些 ContOS 原来的软件包被覆盖。并且,关于“yum-priorities”插件,还没有问题报告。

注释:请注意 yum 的上游维护者 Seth Vidal 于 2009 年 9 月关于“yum priorities”的说法。

... 引入,最后部分:(同样的,大多数人最终还是创建了“yum-priorities”)

天哪,我希望人们不要创建 yum priorities。关于 priorities 的东西是如此之多,真让我望而生畏。它几乎让我想起了 apt “pinning”,并且想出声叫骂。

1.1 Priorities(优先权)

用于 CentOS 5 安装源的 yum-priorities 软件包:
    yum install yum-priorities
    (安装 YUM 优先权插件,生成 /etc/yum/pluginconf.d/priorities.conf 文件)

在 CentOS 5 中,插件默认是可用的。

可以编辑 /etc/yum/pluginconf.d/priorities.conf 文件确保 yum-priorities 是可用的,确认它包含下面一些文本行:
    [main]
    enabled=1  (默认)

编辑 /etc/yum.repos.d/ 路径下的 .repo 文件,通过添加以下文本行来创建 priorities:
    priority=N

对应于每个安装源入口,N 是一个从 1 到 99 的整数。

建议的配置是(CentOS-Base.repo文件):
    [base], [addons], [updates], [extras] ... priority=1
    [centosplus], [contrib] ... priority=2

对第三方安装源,比如 rpmforge(rpmforge.repo文件)等等,priority=N (N 是一个大于 10 的你喜欢的整数)

1.2 RPMforge

可以在 http://dag.wieers.com/packages/ 获得 RPMforge 软件包的一个完整的列表。

下载 rpmforge-release 包。选择以下两个链接中匹配你的 OS 架构(i386/x86_64)的那个下载。如果不能确定是那种架构,请运行 uname -i 命令。

i386 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
    x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

为了使安装源可用,首选的可获得和安装的 rpmforge-release 包只能是上面列出的两个中的一个。

安装 DAG 的 GPG key
    rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

校验下载的包:
    rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm
    校验正确,结果显示:
    rpmforge-release-0.5.1-1.el5.rf.i386.rpm: (sha1) dsa sha1 md5 gpg OK

安全警告:rpmforge-release 包把 GPG keys 导入了 RPM 数据库。

只要你通过了注入软件包的 key 的 md5 校验和,并且信任 Dag, et al., 那么它们将是安全可信的。

安装 rpmforge-release 包

rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm

这将在 /etc/yum.repos.d 添加 yum 安装源配置文件 rpmforge.repo 和 rpmforge-testing.repo(供测试用),并导入合适的 GPG keys。

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

rpmforge-testing.repo 文件内容为:

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

这时。你可以配置 RPMForge 安装源的优先权(priority),如果原先没有配置 CentOS 安装源的优先权,这时也可以配置。

用一下命令进行测试:

yum check-update

它将输出类似以下两行信息:

Loading "priorities" plugin
    ...
    76 packages excluded due to repository priority protections

在你的 CentOS 系统中,上面的数字可能不同,但是它表明有一些包被排除在外了。

如果看到上述信息,它表明 RPMforge 安装源和优先级配置已经起作用了。于是可以试着运行类似 yum install mplayer     如果看到上述信息,它表明 RPMforge 安装源和优先级配置已经起作用了。于是可以试着运行类似 yum install mplayer     如果看到上述信息,它表明 RPMforge 安装源和优先级配置已经起作用了。于是可以试着运行类似 yum install mplayer 命令来安装一些软件了。

注-1:

原文地址如下:
    http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
    本文只选择翻译了与 CentOS 5.0 有关的部分,并在保持原文语义的情况下加入了部分作者的解释。

注-2:

篇章简介:YUM 可以通过加入第三方的安装源来安装一些软件包,本文安装的 RPMForge 就是这样一个例子。这就带来一个问题,如果第三方的安装源里有些软件包比 CentOS 本身预装的对应软件包版本要新的话,就会自动安装较新的版本来代替 CentOS 预装的软件版本,如果盲目地更新进行升级,可能是草率和不明智的,这有可能带来一些潜在的安全和管理问题。

于是,YUM 引入了一种机制,就是依靠“优先权”来对下载源的优先级进行排队。这个是靠 yum-priorities 插件来实现的。而要应用这个特性,需要安装这个插件并配置使其起作用,并在 repo 配置里加入 priority=N 来定义优先级别,这个整数数字(1~99)越小,优先级越高。这样一来,如果不同的下载源有软件包重叠,优先级高的就被保护,而优先级低的就被排除(excluded),不会被检测(check)到也不会被更新(update)。

“优先权”对 check-update、update 和 list 等所有 YUM 子命令都起作用。经过优先级比较和过滤后,所有没有安装的、优先级较高的新软件包仍然可以用:

yum install <软件包名>

命令来安装。

定义的安装源较多时,可以使用:

yum --disablerepo=\* --enablerepo=<安装源>  <命令>

来对安装源进行选择。

注-3:

如果优先级较低的安装源中的软件包,比优先级较高的安装源中的软件包的版本还低,会是什么情形呢?自然更是没商量,被排除掉了。
    就是说,软件包更新时,先考虑优先级,再考虑软件的版本。

作者:张庆(网眼) 西安 PHP 教育培训中心 2010-8-23
    来自“网眼视界”:http://blog.why100000.com
    作者微博:http://t.qq.com/zhangking
    “十万个为什么”电脑学习网:http://www.why100000.com

==============
    原文附录如下:
    ==============

Installing RPMforge

RPMforge is a collaboration of Dag, Dries, and other packagers. They provide over 4000 packages for CentOS, including mplayer, xmms-mp3, and other popular media tools. It is not part of RedHat or CentOS but is designed to work with those distributions.

Note: Because this repository is NOT part of CentOS, you should direct support questions to its maintainers.

Packages are supplied in RPM format and in most cases are ready to use. Beware that some packages are newer than the official CentOS versions and you should not blindly install those packages. Before you replace a CentOS package you should make sure that will not break anything important. In most cases you can revert any mistakes but it is best to avoid the mess.

CentOS 5

If you wish use this repository, you may wish to install Priorities, as a few packages in RPMforge are newer than their counterparts in the CentOS base repositories.

The note below shows the feelings of the yum maintainer but, from a practical standpoint, you have no other way to save packages from being overwritten if you wish to use the RPMforge repository. And, as of yet, no real world problems have been reported with regard to the 'yum-priorities' plugin.

Note: Please note that the upstream maintainer of yum, Seth Vidal, had the following to say about 'yum priorities' in September 2009.

... lead in, ending: (same way most people end up setting up 'yum-priorities' anyway)

Gosh, I hope people do not set up yum priorities. There are so many things about priorities that make me cringe all over. It could just be that it reminds me of apt 'pinning' and that makes me want to hurl.

1.1. Priorities

yum-priorities is available in the CentOS 5 repositories:

yum install yum-priorities

Plugins are enabled in CentOS 5 by default.

Make sure that yum-priorities is enabled by editing the /etc/yum/pluginconf.d/priorities.conf file, and ensuring that it contains the following lines:

[main]
    enabled=1

Edit the .repo files in /etc/yum.repos.d/ and set up priorities by adding the line:

priority=N

to a repository entry, where N is an integer number from 1 to 99.

The recommended settings are:
    [base], [addons], [updates], [extras] ... priority=1
    [centosplus],[contrib] ... priority=2
    Third Party Repos such as rpmforge ... priority=N  (where N is > 10 and based on your preference)

1.2. RPMforge
    You can find a complete listing of the RPMforge package packages at http://dag.wieers.com/packages/

Download the rpmforge-release package. Choose one of the two links below, selecting to match your host's architecture. If you are unsure of which one to use you can check your architecture with the command uname -i
    i386 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
    x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

The preferred rpmforge-release package to retrieve and to install in order to enable that repository is one of the two listed above.

Install DAG's GPG key
    rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

verify the package you have downloaded
    rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm

Security warning: The rpmforge-release package imports GPG keys into your RPM database.

As long as you have verified the md5sum of the key injection package, and trust Dag, et al., then it should be as safe as your trust of them extends.

Install the package
    rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm

This will add a yum repository config file and import the appropriate GPG keys. At this point, you can set the priority of the RPMForge repository, and also of the CentOS repositories if you have not done so yet.

Test with this command:
    yum check-update

It should output these two lines:
    Loading "priorities" plugin
    ...
    76 packages excluded due to repository priority protections

The number above may differ, but there should be several packages shown as being excluded.
    If so then it looks like things are working so try installing something like this:
    yum install mplayer

本文转自网眼51CTO博客,原文链接:http://blog.51cto.com/itwatch/387982,如需转载请自行联系原作者

在 CentOS 5.0 中安装 RPMforge 安装源相关推荐

  1. Hhadoop-2.7.0中HDFS写文件源码分析(二):客户端实现(1)

    一.综述 HDFS写文件是整个Hadoop中最为复杂的流程之一,它涉及到HDFS中NameNode.DataNode.DFSClient等众多角色的分工与合作. 首先上一段代码,客户端是如何写文件的: ...

  2. centos 7 java安装路径_Linux CentOS 7.0中java安装与配置环境变量的步骤详解

    一.前言: CentOS7.0虽然自带JDK1.7和1.8,运行"java -version"命令也可以看到版本信息,但是jdk的安装环境不全,比如缺少tool.jar和dt.ja ...

  3. linux中电商环境配置,Linux CentOS 7.0中java安装与配置环境变量的步骤详解

    一.前言: CentOS7.0虽然自带JDK1.7和1.8,运行"java -version"命令也可以看到版本信息,但是jdk的安装环境不全,比如缺少tool.jar和dt.ja ...

  4. 在CentOs 5.1中使用rpm安装NGINX+php+mysql(二)

    算是原创.转载请注明此地址,随着对NGINX认知的深入,此文会不定期更新或是修正. 以下兵分两路来说明:一是直接利用php-cgi的FastCGI运行方式:二是利用Lighttpd的spawn-fcg ...

  5. Centos 8.0中安装Redis服务器

    企业级开发中,经常需要把一些中间件安装在Linux服务上.主要考虑到linux服务器的性能吧. 1.官网下载Linux版安装包 Redis 楼主使用的是 6.2.1,目前最新是6.2.6 差别不大. ...

  6. CentOS 7.0下使用yum安装MySQL

    CentOS7默认数据库是mariadb,配置等用着不习惯,因此决定改成mysql,但是CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1 ...

  7. CentOS 6.4 中yum命令安装php5.2.17

    最近给公司部署服务器的时候发现他们提供的服务器是centos6.4系统的,装好系统和相关服务httpd,mysql,php,一跑代码,发现php5.3中的zend加密不能用,安装Zend Guard ...

  8. linux 7 tmpfs,技术|如何在RHEL/CentOS 7.0中使用tmpfs

    今天我们来谈谈 Centos 7 中的一个文件系统tmpfs,这是一个将所有文件和文件夹写到虚拟内存中而不是实际写到磁盘中的虚拟文件系统.这意味中tmpfs中所有的内容都是临时的,在tmpfs卸载.系 ...

  9. Hhadoop-2.7.0中HDFS写文件源码分析

    转载自:http://blog.csdn.net/lipeng_bigdata/article/details/53738376 一.综述 HDFS写文件是整个Hadoop中最为复杂的流程之一,它涉及 ...

最新文章

  1. oracle 插入 基准测试,oracle proc 插入操作性能优化实践
  2. 快速深入一门语言的几个问题 - Shell909090 - 随笔杂记
  3. 【MM模块】Source Lists 货源清单
  4. android中 onResume()方法什么时候执行 ??(转)
  5. 为计算机新建一个用户,win10
  6. maya材质sheen_maya怎样做耐磨金属质感?
  7. 【机器学习-西瓜书】六、支持向量机:核技巧;软间隔;惩罚因子C;松弛变量
  8. 【转】winIO的解释与使用
  9. 配置visual studio code进行asp.net core rc2的开发(转载jeffreywu)
  10. 泛微oa服务器文件,泛微OA根据文档的docid查询文档附件存放的路径
  11. idea json转对象(Java实体类)
  12. 网上书店系统源代码java_java版网上书城系统
  13. Himall商城图片帮助类ImageHelper 生成验证码
  14. 驱动精灵w8ndows xp sp2,爱普生Epson TM-L60II打印机驱动官方正式版下载,适用于winxp,winvista,win7,win8,win10-驱动精灵...
  15. 树莓派 无法定位软件包 解决方案
  16. 经方的魅力第二版》读书摘录
  17. 两条波浪线符号_最新-Word上中下划波浪线符号怎么打 精品
  18. 入侵检测系统(IDS)与入侵防御系统(IPS)的简单理解
  19. Windows无线网络设置中的7种安全类型简介
  20. 读取、回收和重用:使用 Excel、XML 和 Java 技术轻松搞定报告,第 2 部分

热门文章

  1. java 解析el表达式_Javaweb El表达式实例详解
  2. class path resource (xml文件) cannot be opened because it does not exist
  3. oracle 当前top sql,Oracle top 查询TOP SQL
  4. 最新安徽安全员B考试判断题预测题库
  5. 新手开水果店到底赚不赚钱,开水果店一年赚钱大概有多少
  6. java jni释放_JNI 资源释放
  7. 使用iso制作qcow2镜像
  8. 学习UI设计必知的防雷小知识:11例UI设计规范模板
  9. CSS 鼠标样式 cursor属性
  10. 电商API接口系列,item_get-获得淘宝商品详情