被Debian/Ubuntu惯坏了之后,再来用 RHEL/CentOS 实在是有点不习惯,软件都老且不说,关键是你还别嫌老(5年一个大版本的节奏真受不了啊,RHEL 6上面还是python 2.6),大多数时候还没有,这也是为啥网上很多系统管理员一说安装软件都是 ./configure && make && make install 自行编译三部曲。这对于简单的软件还好说,对于一些复杂的软件,还真不放心编译时依赖软件/依赖库都装了,版本是否都对了,编译选项是否都启用了。。。再加上我这样的懒人,真懒得编译。

—— 先不抱怨了,好歹RHEL/CentOS上还有几个比较大的第三方库,这比之前部门强推的SuSE Linux Enterprise Edition已经强不少了(别跟我说OBS 那上面的仓库)。

注:为简单起见,这里只按CentOS 6.x/x86_64进行说明,对于其它版本和i386架构(以及ppc等架构),请以此类推。至于CentOS 7弃用yum改用dnf的事情,过两年用上CentOS 7的时候再说吧。

1. EPEL (Extra Packages for Enterprise Linux)

http://fedoraproject.org/wiki/EPEL

EPEL provides rebuilds of Fedora packages for EL5, EL6 and EL7. Packages should not replace base,
although there have been issues around point releases in the past. You can install EPEL by running
yum install epel-release. The epel-release package is included in the CentOS Extras repository
that is enabled by default.

添加此仓库的方法:

  wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm# or# wget http://ftp.cn.debian.org/epel/epel-release-latest-6.noarch.rpmrpm -Uvh epel-release-latest-6.noarch.rpm 

软件包分类浏览: http://ftp.cn.debian.org/epel/6Server/x86_64/repoview/
软件包详细列表: http://ftp.cn.debian.org/epel/6Server/x86_64/

参考说明:

  • Red Hat Enterprise Linux / CentOS Linux Enable EPEL (Extra Packages for Enterprise Linux) Repository - cyberciti.biz(nixcraft)

2. rpmfusion

http://rpmfusion.org/

RPMfusion Repository - (See http://rpmfusion.org/) provides "software that the Fedora Project or Red
Hat doesn't want to ship" for EL5 and 6. Known to replace base packages.

添加此仓库的方法:

wget -c http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm
wget -c http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm
# or
wget -c http://ftp.cn.debian.org/rpmfusion/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm
wget -c http://ftp.cn.debian.org/rpmfusion/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm
yum -ivh rpmfusion-*release-6*.rpm

详细说明请阅读: Configuration - RPM Fusion

3. repoforge (以前也叫rpmforge或者wag)

http://repoforge.org/

CentOS的Wiki上对repoforge的说明是:
Although once recommended, this repository is no longer maintained, and is not advised.

虽然如此,但rpmforge提供的软件还是比较多的,并且跟别的第三方仓库不同的是,它会对RHEL/CentOS发布版内含
的软件也提供更新版本,所以在很多时候还是得找它。(不过 http://ftp.cn.debian.org 没有提供此仓库的镜像,
而前面epel和rpmfusion都有)。

添加此仓库的方法:

wget -c http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-*.rpm

详细说明请阅读 Using RepoForge。

4. Software Collections (SCL)

https://www.softwarecollections.org/en/

其实这不算一个“第三方仓库”,因为它是RedHat/CentOS自己提供的。这个仓库没提供几个软件,主要是服务器上
常用的apache/mysql/python/ruby/pgsql等软件的新版本(再吐槽一遍: RHEL/CentOS里面的软件包实在是太老
了!!!),它们也不会覆盖原来的旧版本,使用上也需要采用特殊的方式(比如scl enable python33 -m SimpleHTTPServer)

The SCL repository contains newer versions of various programs. These packages can be installed
alongside existing older packages. At the time of writing, the repository contains packages for
mariadb55, mysql55, nodejs010, perl516, php54, postgres92, python27, python33 and ruby193.

CentOS 6的仓库里面已经有这个SCL仓库的地址描述,执行下面的语句就可以此仓库:

yum install centos-release-SCL

参考文档:

  • SCL项目:在Red Hat系列系统上安装同一软件的不同版本-CSDN.NET
  • Red Hat Software Collections 2.1 Release Notes
  • AdditionalResources/Repositories/SCL - CentOS Wiki
  • 红帽发布开发者工具集套件3.1和RedHat Software Collection 2测试版

5. 补充说明

可以查看仓库列表

因为有时候会有其他人修改(或者自己以前修改的,但忘记了) /etc/yum.repos.d/<foobar>.repo ,对某些仓库设置了禁用 (enabled=0),这时可以用 yum repolist 看看到底有哪些仓库。

在本地查看单个仓库的包列表

yum --disablerepo="*" --enablerepo="epel" list available | less

仓库的优先级问题(以及如何从指定库安装软件)

虽然大多数情况下你都期望安装新版本(多个仓库有同一个软件时,yum会安装版本最新那个),但有时候也会有想装老版本的场景,这时候有以下几种做法:

  1. 设置仓库的优先级: 安装 yum-plugin-priority,然后在 /etc/yum.repos.d/*.repo 里面设定每个仓库的优先级(详细的说明请见 [[https://wiki.centos.org/PackageManagement/Yum/Priorities][PackageManagement/Yum/Priorities - CentOS Wiki]] );
  2. 安装时临时禁用新版本所在的仓库: yum --disablerepo=extras install packageA
  3. 安装时指定从某个仓库安装这款软件: yum --disablerepo="*" --enablerepo="epel" install packageA
  4. nixcraft的博客文章RHEL/CentOS EPEL (Extra Packages for Enterprise Linux) Repository里面还提到另外一个叫做yum-plugin-protectbase的插件,说 This plugin allows certain repositories to be protected. Packages in the protected repositories can't be overridden by packages in non-protected repositories even if the non-protected repo has a later version. 但我也是刚看见,还没有用过。

6. 其它相关链接

  • CentOS的Wiki上有很详细的第三方软件库列表:
    AdditionalResources/Repositories - CentOS Wiki
  • (原创)RHEL/CentOS 5.x使用第三方软件库(EPEL与RPMForge、RPMFusion软件库)
  • 15 Linux Yum Command Examples – Install, Uninstall, Update Packages

RHEL/CentOS 一些不错的第三方软件包仓库相关推荐

  1. CentOS上最佳的第三方仓库

    从 Software Collections.EPEL 和 Remi 获得可靠的 CentOS 新版软件. 在 Red Hat 企业 Linux(RHEL) 上,提供那些早已老掉牙的软件已经是企业级软 ...

  2. CentOS 上最佳的第三方仓库

    从 Software Collections.EPEL 和 Remi 获得可靠的 CentOS 新版软件. 在 Red Hat 企业 Linux(RHEL) 上,提供那些早已老掉牙的软件已经是企业级软 ...

  3. RHEL/CentOS/Fedora各种源(EPEL、Remi、RPMForge、RPMFusion)配置

    摘自: http://blog.51osos.com/linux/rhel-centos-fedora-epel-remi-rpmforge-rpmfusion/ CentOS默认自带CentOS-B ...

  4. RHEL/CentOS/Fedora各种源

    RHEL/CentOS/Fedora各种源(EPEL.Remi.RPMForge.RPMFusion)配置 GoFace 于 2011-8-30,14:31 Hot: 3,117 ℃ Comments ...

  5. 安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(一)

    安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(一) CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的衍生版本.你安装完后马上就可以使用,但是为了更 ...

  6. 安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(四)

    安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(四) 17. 安装 Webmin Webmin 是基于 Web 的 Linux 配置工具.它像一个中央系统,用于配置各种系统设置,比 ...

  7. 安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情

    转载自:https://linux.cn/tag-RHEL%207.html CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的衍生版本.你安装完后马上就可以使用,但是为 ...

  8. RHEL/CentOS 6.x使用EPEL6与remi的yum源安装MySQL 5.5.x

    PS:如果既想获得 RHEL 的高质量.高性能.高可靠性,又需要方便易用(关键是免费)的软件包更新功能,那么 FedoraProject 推出的 EPEL(Extra Packages for Ent ...

  9. 时间服务器端口协议,在RHEL / CentOS 7中设置“NTP(网络时间协议)服务器”

    网络时间协议 - NTP-是在传输层运行在123端口UDP和允许计算机通过网络的时间一个精确的时间同步协议.随着时间的流逝,计算机内部时钟往往漂移,这可能导致不一致的时间问题,特别是在服务器和客户端日 ...

最新文章

  1. 你哪来这么多事(六):职工信息查找
  2. Openshift创建Router和Registry
  3. 客户端独立弹出详细的实现过程
  4. qml入门学习(二):引入js文件
  5. STM32工作笔记0011---认识跳线帽
  6. Eclipse 快捷键整理
  7. 【渝粤教育】国家开放大学2018年秋季 0299-22T中国古代文学(1) 参考试题
  8. NetMeeting不能共享桌面的解决办法
  9. Spring中bean的生命周期
  10. Symantec Endpoint Protection(SEP) 离线病毒库下载与升级
  11. 数据同步工具简单介绍
  12. 苹果PD20W快充方案缺货,芯片供应不足,怎么破局?
  13. Hadoop之——重新格式化HDFS的方案
  14. Client-Initiated场景下的L2TP实验配置
  15. 六度分离(Floyd算法)
  16. Bootstrap免费字体和图标网站
  17. Django之开发微信小程序后端-会话管理篇③
  18. Matlab入门基础_三
  19. cnpm i 与 npm i
  20. 【前端问题分析】从输入 URL 到浏览器接收的过程中发生了什么事情?

热门文章

  1. Flutter 基础布局Widgets之Baseline、AspectRatio详解
  2. 开源Pravega架构解析:如何通过分层解决流存储的三大挑战?
  3. 程序终于实现跨机器运行——记VC++2005程序开发的一个常见问题
  4. Python技术栈与Spark交叉数据分析双向整合技术实战--大数据ML样本集案例实战
  5. Python-TXT文本操作
  6. block用法(转)
  7. [PHP] 自动加载的实现
  8. 关于函数式宏定义的学习
  9. 基于策略的路由(下)
  10. 从键盘输入4个学生的有关数据,然后把它们保存到磁盘文件中,最后从磁盘文件中读取数据输出到屏幕...