运维系列:为Linux配置常用源:epel和IUS

为Linux配置常用源:epel和IUS




为Linux配置常用源:epel和IUS

CentOS上,除了os类yum源,还需要配置几个常用的源:epelius

1.1 EPEL

Extra Packages for Enterprise Linux (or EPEL) 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), Oracle Linux (OL).

简言之,EPEL是专门为RHELCentOSLinux发行版提供额外rpm包的。很多os中没有或比较旧的rpm,在epel仓库中可以找到。

例如配置阿里云的epel

rpm -ivh https://mirrors.aliyun.com/epel/epel-release-latest-6.noarch.rpm
rpm -ivh https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm

1.2 IUS

kernel.org内,清楚地说明了IUS项目是干什么的:

IUS is a community project that provides RPM packages for newer versions of select software for Enterprise Linux distributions.
 
Project Goals
   Create high quality RPM packages for Red Hat Enterprise Linux (RHEL) and CentOS.
   Promptly release updated RPM packages once new versions are released by the upstream developers.
   No automatic replacement of stock RPM packages

.
IUS只为RHELCentOS这两个发行版提供较新版本的rpm包。如果在osepel找不到某个软件的新版rpm,软件官方又只提供源代码包的时候,可以来ius源中找,几乎都能找到。例如haproxy,在CentOS 6epel中只有1.5版本的,但ius中却提供了1.61.7版本。

IUS源的站点根目录:https://dl.iuscommunity.org/pub/ius/

IUS提供4个分支的rpm包stablearchivedevelopmenttesting。显然,我们应该选择stable分支的包。

在这里插入图片描述

配置IUS源:

rpm -ivh https://rhel5.iuscommunity.org/ius-release.rpm     # RHEL 5
rpm -ivh https://rhel6.iuscommunity.org/ius-release.rpm     # RHEL 6
rpm -ivh https://rhel7.iuscommunity.org/ius-release.rpm     # RHEL 7
rpm -ivh https://centos5.iuscommunity.org/ius-release.rpm  # CentOS 5
rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm  # CentOS 6
rpm -ivh https://centos7.iuscommunity.org/ius-release.rpm  # CentOS 7

rpm安装ius-release.rpm时,依赖于epel。所以必须先安装epel源。注意,这是包的依赖关系,因此必须是安装了epel,而不是仅仅在repo文件中配置了epel源

yum -y install epel-release

安装后,建议修改为国内ius源。在https://mirrors.iuscommunity.org/mirrors内可以查看到IUS项目的mirrorlist中所有的IUS站点。我看了下,中国地区只有两个站点:清华大学镜像站点和同济大学镜像站点。(阿里镜像mirrors.aliyun.com也在2018-03-28日上线了ius,同日还上线了remi)

https://mirrors.tuna.tsinghua.edu.cn/ius/stable/CentOS/6/$basearch  # CentOS 6
https://mirrors.tuna.tsinghua.edu.cn/ius/stable/Redhat/6/$basearch  # RHEL 6
https://mirrors.tongji.edu.cn/ius/stable/CentOS/6/$basearch         # CentOS 6
https://mirrors.tongji.edu.cn/ius/stable/Redhat/6/$basearch         # RHEL 6

或者,直接在repo文件中添加ius仓库,更方便,这样不依赖于epel

[root@xuexi ~]# vim /etc/yum.repos.d/ius.repo
[ius]
name=iusrepo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/ius/stable/CentOS/6/$basearch
gpgcheck=0
enable=1

然后清除缓存再建立缓存即可。

yum clean all ; yum makecache 







骏马金龙

为Linux配置常用源:epel和IUS

  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

坦笑&&life

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值