Linux系统运维之如何为Linux安装配置EPEL和IUS 源
白羽 2018-07-11 来源 :网络 阅读 1412 评论 0

摘要:本文将带你了解Linux系统运维之如何为Linux安装配置EPEL和IUS 源,希望本文对大家学Linux有所帮助。


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

有很多国内很多镜像站点都提供了各类仓库的镜像站点,个人感觉比较全的是阿里云//mirrors.aliyun.com和清华大学开源镜像站点https://mirrors.tuna.tsinghua.edu.cn。特别是后者,很多知名源项目的mirrorlist中都将其作为中国地区的唯一站点。如果有时候你在阿里镜像、搜狐镜像等知名站点都找不到某个源时,不妨去清华大学的站点找找。

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是专门为RHEL、CentOS等Linux发行版提供额外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只为RHEL和CentOS这两个发行版提供较新版本的rpm包。如果在os或epel找不到某个软件的新版rpm,软件官方又只提供源代码包的时候,可以来ius源中找,几乎都能找到。例如haproxy,在CentOS 6的epel中只有1.5版本的,但ius中却提供了1.6和1.7版本。

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

IUS提供4个分支的rpm包:stable、archive、development和testing。显然,我们应该选择stable分支的包。

 

2、配置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站点。我看了下,中国地区只有两个站点:清华大学镜像站点和同济大学镜像站点。

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@linuxidc ~]# 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!


本文由 @白羽 发布于职坐标。未经许可,禁止转载。
喜欢 | 0 不喜欢 | 0
看完这篇文章有何感觉?已经有0人表态,0%的人喜欢 快给朋友分享吧~
评论(0)
后参与评论

您输入的评论内容中包含违禁敏感词

我知道了

助您圆梦职场 匹配合适岗位
验证码手机号,获得海同独家IT培训资料
选择就业方向:
人工智能物联网
大数据开发/分析
人工智能Python
Java全栈开发
WEB前端+H5

请输入正确的手机号码

请输入正确的验证码

获取验证码

您今天的短信下发次数太多了,明天再试试吧!

提交

我们会在第一时间安排职业规划师联系您!

您也可以联系我们的职业规划师咨询:

小职老师的微信号:z_zhizuobiao
小职老师的微信号:z_zhizuobiao

版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
 沪公网安备 31011502005948号    

©2015 www.zhizuobiao.com All Rights Reserved

208小时内训课程