作者:audered
转自:CentOS官方推荐的第三方软件仓库和安装方法
src: http://wiki.centos.org/AdditionalResources/Repositories
上面是这篇文章的原始出处,在CentOS社区wiki里,我做了点翻译,也加了点个人体会。
repository好像一般翻译成源,大家都说从什么源安装什么软件,但是我不明白repositories怎么就成源了呢,貌似应该是软件仓库的意思才对啊...也许是约定俗称的吧,有知道出处的XDJM请不吝赐教...
CentOS中文资料不好找,虽然看英文对我还是比较容易理解的,但是看了这么多免费的资料,想想还是要给点回报的,所有有了这篇翻译的小文章...
--------------------------------------------------------------------------------------
*************************************************************
3rd Party Repositories
*************************************************************
我个人强烈推荐rpmforge这个软件仓库,太好用了...repository...
RPMForge - This repository is a collaboration of Dag (who also maintains an individual archive), Dries, and other packagers. They provide over 4000 packages for CentOS, including mplayer, xmms-mp3, and other popular media tools. You can find more information about rpmforge at http://rpmforge.net/ or read the instructions on Installing RPMForge http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
This repository is considered by many in the community to be stable and safe.
RPMForge拥有4000多种CentOS的软件包,被CentOS社区认为是最安全也是最稳定的一个软件仓库。
主页:http://rpmforge.net/
安装指南:http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
-----------------------------------------------------------------------------------------
rpmforge的安装方法
src:http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
CentOS 5
You should make sure that you have Priorities installed.
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
Download the rpmforge-release package. Choose one of the two links below, depending on your architecture. If you are unsure of which one to use you can check your architecture with the command uname -i
i386 http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
x86_64 http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
(You can find a complete list of rpmforge-release package packages at http://dag.wieers.com/packages/rpmforge-release/ but it is recommended that you use one of the two listed above).
Install DAG's GPG key
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
Verify the package you have downloaded
rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm
Security warning: The rpmforge-release package imports GPG keys into your RPM database. As long as you have verified the package and trust Dag then it should be safe.
Install the package
rpm -i rpmforge-release-0.3.6-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
----------------------------------------------------------------------------------------
1、确认系统是否安装了priority这个yum的插件,这个插件用来保证安装软件时候软件仓库先后次序,一般是默认先从官方base或者镜像安装,然后从社区用户contribute的软件中安装,再从第三方软件仓库中安装。当然这个次序可以自己更改,为了安全和稳定还是依照这个次序吧....
yum install yum-priorities
安装完以后查看 /etc/yum/pluginconf.d/priorities.conf 文件,确认文件中有这一行
[main]
enabled=1
同时,为了防止一些已经废弃(obsoletes)的包的出现,在这个文件[main]范围内加上check_obsoletes=1
在一个软件包的头信息(metadata)里面已经标注这个包作废不再使用,但是在使用priorities这个插件以后,可以会导致低权限软件仓库中的软件包安装替换了从高权限软件仓库中安装的软件包。比如一个低限软件仓库中的软件包叫做gconfmm20而高权限软件仓库的软件包叫做gconfmm2,系统会认为gconfmm20版本更高...这就引起了错误...
上面这一段来自
http://wiki.centos.org/PackageManagement/Yum/Priorities
----------------------------------------------------------------------------------------
原文:
After the plugin is installed, make sure that it is enabled. You can do this by editing the /etc/yum/pluginconf.d/priorities.conf file, and ensuring that it contains the following lines:
[main]
enabled=1
Some packages specify obsoletes in their metadata. This property of a package specifies which old packages with a different name the package replaces. This can intefere with the priority protection of packages, if a package from a low-priority repository contains an obsoletion for package from a high-priority repository. For instance, if the gconfmm2 package was installed from a high-priority repository, and another package (say gconfmm20) claims to replace the obsolete gconfmm2 package, Yum will replace the gconfmm2 package with the gconfmm20 package. This plugin can prevent such upgrades, by adding the following line to the main section of /etc/yum/pluginconf.d/priorities.conf:
check_obsoletes=1
---------------------------------------------------------------------------------------
2、现在就可以手动编辑 /etc/yum.repos.d/ 目录中后缀为.repos的文件来设置软件仓库的先后次序(感觉我这个翻译不是很适当,priority主要还是个权限问题,但一时找不到更好的词,就这样吧)....
priority=N(N是整数,范围从1-99)
官方推荐配置是
[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)
贴个参考的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=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
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=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
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=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
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=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
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=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
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=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
priority=2
--------------------------------------------------------------------------------------
3、现在开始安装rpmforge的软件仓库
a 先下载rpmforge的安装包
i386 http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
x86_64 http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
b 安装DAG的PGP Key
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
c 验证下载包的完整性
rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm
d 安装包
rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm
e 更改 /etc/yum.repos.d/rpmforge.repo 配置文件,就是添加
priority=3(或者1.2.4....)这一句
f 现在就可以使用rpmforge这个软件仓库了....
g 安装mplayer这样的软件也就是yum install mplayer就可以了,方便了很多啊....
--------------------------------------------------------------------------------------
*************************************************************
Request Tracker - This repository provides a yum based install for the popular request tracker ticketing system and its dependencies. This repository is available at http://campus.fct.unl.pt/paulomatos/rt/repository/3.4.x/rt-3.4.x.repo and the centos news article is at http://www.centos.org/modules/news/article.php?storyid=114
Note: - If you are planning to use this repository and have ProtectBase configured for your base repositories, you need to "protect" this repository also, as it has to overwrite at least two packages from the base distribution (namely mod_perl). And it has some contents that would be overwritten by the rpmforge repository, if the rt repository isn't "protected".
Note: - If you are using this repository and the rpmforge repository and you don't have the Protectbase or Priorities plugin installed, you have to put the following exclude into your /etc/yum.repos.d/rpmforge.repo file:
exclude=perl-DBIx-SearchBuilder
Otherwise installation will complain about "Missing Dependency: perl(DBD::Oracle) is needed by package perl-DBIx-SearchBuilder."
这个仓库没什么东东,我装了,但是不推荐,安装的话就是以上步骤,恕不翻译了....
*************************************************************
KBS-Extras - This site provides a rebuild of Fedora Extras for CentOS, as well as number of other packages. This repository is available at http://centos.karan.org and has a reputation for being stable and safe.
这个软件仓库主要是把Fedora下的软件包重新封装成CentOS下面的包,并拥有不错的声誉,稳定、安全。
-------------------------------------------------------------------------------------
以下来自 http://centos.karan.org
这个仓库的维护者的email地址: kbsingh@karan.org ICQ:
仓库主要包括两部分软件,一部分是Fedora Extras的重新封装,另外一部分是Misc pkg. Misc pkg包括很多kbsingh自己从源代码重新封装的软件包,如果要使用就必须先安装Fedora Extras的软件仓库。作者告诫说安装Misc pkg可能会替换或者覆盖CentOS原有的pkg包,风险自负...
但是看社区反映应该没什么问题...我装了,用了...等我挂了就告诉大家...
安装很简单:
Fedora Extras rebuild Repository:
下载 http://centos.karan.org/kbsingh-CentOS-Extras.repo ,放到 /etc/yum.repos.d/ 即可。如果要保证更新,使用up2date manager, 在这个文件里 /etc/sysconfig/rhn/sources 加上下面一句:
yum kb-centos-extras http://centos.karan.org/el4/extras/stable/$ARCH/RPMS
Misc Packages rebuild Repository:
下载 http://centos.karan.org/kbsingh-CentOS-Misc.repo ,放到 /etc/yum.repos.d/ 即可。如果要保证更新,使用up2date manager, 在这个文件里 /etc/sysconfig/rhn/sources 加上下面一句:
yum kb-centos-misc http://centos.karan.org/el4/misc/stable/$ARCH/RPMS
导入PGP key
rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
-------------------------------------------------------------------------------------
ps: CentOS 5.2说, /etc/sysconfig/rhn/sources 已经不再使用,所以的仓库管理都通过yum设置。事实上up2date是Red Hat Network以前使用的东东,现在已经用 yum update替代了,所以就无需去更改 /etc/sysconfig/rhn/sources 文件了,配置priority以后就没问题了...
事实上,在yum install yum-priorities以后,会自动为新添加的仓库加上priority=N这样的语句,无需自己再重新添加,所要做得只是cat一下这个文件,保证priority的配置而已。
# CentOS NOTE: This file is deprecated and no longer used, all system management
# is now handled via yum, look at yum's configs to manage repositories etc
*************************************************************
kde-redhat.sf.net - This repository provides more recent (bleeding-edge) versions of KDE for use on redhat based systems. This repository has a decent reputation, and a sizable support community.
Note: - This will update MANY items to newer versions including all of KDE, QT, samba, etc. This seems to work OK on all machines I have tried, but your machine will be far from CentOS with many changes to the [Base] CentOS Operating System. Information concerning setup is available here: http://kde-redhat.sourceforge.net/
作为gnome用户,我就不装这个东东了。社区在检验后好像没什么问题,但是还是警告了用户要小心使用这个仓库。
*************************************************************
ATrpms - This repository provides many bleeding-edge applications and media utilities such as myth-tv. This repository is available at http://atrpms.net/
This repository has been reported to replace system packages and may cause stability issues. Use at your own risk. - this is only true for CentOS 4 and below.
The CentOS 5/RHEL 5 repository from atrpms.net is safe to use, if you only use the stable version. Packages in there do not overwrite system packages.
If you also enable testing and bleeding, you are on your own again - these two do overwrite system packages.
这个仓库提供了很多使用最新技术的应用程序和像myth-TV这样的多媒体工具, 仓库链接 http://atrpms.net/
在CentOS4和以前的版本中,这个仓库曾经被社区用户指出其替换了系统核心程序并导致一系列的不稳定。
对于使用CentOS5/RHEL5版本的用户来说,这个仓库是安全的,尤其是在用户只使用稳定stable版本的软件的时候...软件包已经不再覆盖系统程序了...
如果想试验最新技术,使用bleeding和testing时候自担风险,这两个目录的软件肯定会覆盖系统原有程序的...
PS:这个仓库对每个版本都有三个不同的软件版本,目录为bleeding\stable\testing...查看: http://dl.atrpms.net/el5-i386/atrpms/所以CentOS 所以wiki的作者在这里用these two...
如果想用最新技术就用fedora了,我还是用stable来更新吧...一些多媒体工具会有一些专利技术在,比如mp3/rmvb解码这样的东东,所以这个仓库还是有价值的...
-------------------------------------------------------------------------------------
以下来自: http://atrpms.net/
这个软件仓库一开始主要是提供一些自然科学方面的软件,尤其是高能物理计算和数值计算工具这样的软件。在加入了很多其他软件以后,这个仓库已经不再是以前那么单一性质的软件仓库了。
安装方法:
a、首先导入PGP key
rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms
b、然后配置仓库文件,方法有两种
一是直接建立一个文件,放在/etc/yum.repos.d/目录下,可以命名成atrpms.repo,内容如下:
# Name:ATrpms
# URL: http://atrpms.net/
[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el5-i386/atrpms/stable/
#baseurl=http://dl.atrpms.net/el5-i386/atrpms/bleeding/
#baseurl=http://dl.atrpms.net/el5-i386/atrpms/testing/
enable=1
protect=0
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
priority=5
(PS:这个是我个人建议的配置,官方建议配置如下:)
Make sure the following lines are included in /etc/yum.conf:
在 /etc/yum.conf 里面加入以下语句:
[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
(PS: yum.conf里面有这样的语句, # PUT YOUR REPOS HERE OR IN separate files named file.repo, 放在这个下面即可)
*************************************************************
Extra Packages for Enterprise Linux (EPEL)- This repository (See http://fedoraproject.org/wiki/EPEL) provides rebuilds of Fedora packages for EL4 and EL5. Install the appropriate epel-release for EL4 or epel-release for EL5 package to configure. This repo has made efforts not to replace system packages and in some cases has endeavored to directly address CentOS compatibility, but may not mix well with other 3rd party repos. So, make SURE you are using the Priorities yum plugin if you are using EPEL ... especially if you are using it with other 3rd party repos.
这个仓库为RHEL4和RHEL5提供fedora的重新封装软件包,对于不同版本需要安装不同的rpm包来配置仓库地址。这个仓库的管理员已经使仓库中的软件不替换系统文件,而且在一些情况下尽可能的告知软件和CentOS的兼容性。但是这个仓库和其他第三方仓库混合使用时工作的不尽如人意。所以,如果要使用这个仓库请确保yum-priorities的安装,尤其是在和其他第三方软件仓库混合使用的时候...
-------------------------------------------------------------------------------------
以下来自: http://fedoraproject.org/wiki/EPEL
Extra Packages for Enterprise Linux (EPEL) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs such as CentOS or Scientific Linux.
EPEL是由一个志愿者组成的社区,为完全基于fedora的RHEL(以及兼容的CentOS和其他用于科研用途的Linux)打造高质量软件包的软件仓库。
安装方法:
下载 http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
yum -i epel-release-5-3.noarch.rpm
然后修改/ete/yum.repos.d/epel.repo文件,设置priority=N
然后就可以正常使用了....
*************************************************************
更多细节,请参看各自的网页链接,我在这里只是简单介绍一下CentOS开发社区推荐的第三方软件仓库和使用方法而已...
*************************************************************
PS:翻译太累了,看懂英文对技术人员来说不是大问题,要译成中文还要“信、达、雅”就是mission impossible了...
*************************************************************