RHEL/CentOS/Fedora各种源(EPEL、Remi、RPMForge、RPMFusion)配置 、YUM 源优先级插件:Yum Priorities

本文转载自http://www.linuxidc.com/Linux/2013-05/85077.htm


       CentOS默认自带CentOS-Base.repo源,但官方源中去除了很多有版权争议的软件,而且安装的软件也不是最新的稳定版。Fedora自带的源中也找不到很多多媒体软件,如果需要安装,必需先添加其他源,如RPMFusion和RPMForge等第三方软件库。

       下面GoFace来一一介绍各种第三方软件库,以下软件库适用于与RHEL完全兼容的linux发行版,如CentOS,Fedora,Scientific Linux。Scientific Linux大家可能有点陌生,它与CentOS类似,是RedHat Linux的克隆版,GoFace相关阅读:官方正式发布 Scientific Linux 6.4 版本 http://www.linuxidc.com/Linux/2013-03/81910.htm

 

EPEL源

        EPEL,即Extra Packages for Enterprise Linux,是由 Fedora 社区创建维护,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。EPEL中含有大量的软件,对官方标准源是一个很好的补充。

       “EPEL (Extra Packages for Enterprise Linux ) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL).”

wiki:http://fedoraproject.org/wiki/EPEL

Fedora EPEL 下载:http://mirrors.fedoraproject.org/publiclist/EPEL/

EPEL 下载地址:http://download.fedora.redhat.com/pub/epel/

请针对不同的版本下载相应的包。

Remi源

       Remi源大家或许很少听说,不过Remi源GoFace强烈推荐,尤其对于不想编译最新版的linux使用者,因为Remi源中的软件几乎都是最新稳定版。或许您会怀疑稳定不?放心吧,这些都是Linux骨灰级的玩家编译好放进源里的,他们对于系统环境和软件编译参数的熟悉程度毋庸置疑。

Remi下载地址:http://rpms.famillecollet.com/

您也需要针对不同的版本号下载。

RPMForge源

      RPMForgeCentOS系统下的软件仓库,拥有4000多种的软件包,被CentOS社区认为是最安全也是最稳定的一个软件仓库。

RPMForge官方网站:http://repoforge.org/

RPMForge下载地址:

32位:http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/

64位:http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/

RPMFusion源

         如果您现在正在使用Fedora 15,对RPMFusion一定不陌生吧,各种音频软件如MPlayer在标准源中是没有的,一般先安装RPMFusion源,之后就可以放便地yum install各种需要的软件啦。

CentOS官方说RPMFusion软件库里面的软件稳定性不如rpmforge。

RPMFusion官网:http://rpmfusion.org/

Fedora 13, 14 and 15:

su -c ’yum localinstall –nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.

noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm’

RHEL 6/CentOS 6 :

su -c ’rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/6/i386/rpmfusion-free-release-6-0.1.noarch.rpm 

http://download1.rpmfusion.org/nonfree/el/updates/testing/6/i386/rpmfusion-nonfree-release-6-0.1.noarch.rpm’

其他版本请详见:http://rpmfusion.org/Configuration

如何使用各种源

以上源对CentOS等系统完全兼容,但各软件库之间并不能保证完全兼容没有冲突。如果您需要使用以上源,您需要安装yum-priorities插件。安装yum-priorities插件后,您可以给各个源设置优先级priority。一般设置官方标准源优先级为1,最高,第三方推荐>10

priority=N (N为1到99的正整数,数值越小越优先)

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

#vi CentOS-Base.repo

[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-6

priority=1

#released updates

……

#wget http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm

#wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

[root@GoGo yum.repos.d]# ls

CentOS-Base.repo CentOS-Media.repo epel-testing.repo

CentOS-Debuginfo.repo epel.repo remi.repo

vi remi.repo 将[remi] 中的 enabled=0 改成 enabled=1 来启用 remi 源

[root@GoGo yum.repos.d]# rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[root@GoGo yum.repos.d]# rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi

在remi.repo中和epel.repo中添加priority设置即可使用。


=====================================================================================

https://cnzhx.net/blog/yum-priorities/

     Linux 发行版比较多,同时还有很多个人或组织维护了某些特定用途的安装/升级源。Yum Priorities 插件可以用来强制保护源。它通过给各个源设定不同的优先级,使得系统管理员可以将某些源(比如 Linux 发行版的官方源)设定为最高优先级,从而保证系统的稳定性(同时也可能无法更新到其它源上提供的软件最新版本)。

安装 Yum Priorities

  1. 在控制台运行 Yum Priorities 安装指令
     yum install yum-priorities

配置使用 Yum Priorities

  1. 使用熟悉的文本编辑器(如 vim)打开 Yum Priorities 配置文件/etc/yum/pluginconf.d/priorities.conf
    vim /etc/yum/pluginconf.d/priorities.conf
    1. 确保配置文件中包含下面的行
      [main]
      enabled=1
    2. 保存并关闭该文件
  2. 打开 CentOS base 源配置文件 /etc/yum.repos.d/CentOS-Base.repo
    1. 将下面的文本分别添加到 Base, Updates, Addons, 和 Extras 这几个源记录的后面*
      priority=1
    2. 将下面的文本添加到 CentOSPlus 源记录的后面*
      priority=2

* 源记录(repository entry)是由 [ 和 ] 括起来的源名称。例如,Base 源记录就标记为[base] 。
** 优先级由 1 ~ 99 的 99 个数表示,1 的优先级最高。优先级小的源即使有某软件的较新版本,如果优先级高的源中没有,在启用该插件的情况下,系统也无法安装/升级到该较新版本。图形界面的 YUM 工具一般默认就已经包含了优先级插件。
*** 要禁用 YUM 优先级功能,只需要在(1.A.) /etc/yum/pluginconf.d/priorities.conf 中将 enable=1 改为 enable=0 即可。不建议!


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值