博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
为Linux配置常用源:epel和IUS
阅读量:4499 次
发布时间:2019-06-08

本文共 2635 字,大约阅读时间需要 8 分钟。

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

有很多国内很多镜像站点都提供了各类仓库的镜像站点,个人感觉比较全的是阿里云和清华大学开源镜像站点。特别是后者,很多知名源项目的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.rpmrpm -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源的站点根目录:

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

配置IUS源:

rpm -ivh https://rhel5.iuscommunity.org/ius-release.rpm     # RHEL 5rpm -ivh https://rhel6.iuscommunity.org/ius-release.rpm     # RHEL 6rpm -ivh https://rhel7.iuscommunity.org/ius-release.rpm     # RHEL 7rpm -ivh https://centos5.iuscommunity.org/ius-release.rpm  # CentOS 5rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm  # CentOS 6rpm -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源。在内可以查看到IUS项目的mirrorlist中所有的IUS站点。我看了下,中国地区只有两个站点:清华大学镜像站点和同济大学镜像站点。(阿里镜像mirrors.aliyun.com也在2018-03-28日上线了ius,同日还上线了remi)

https://mirrors.tuna.tsinghua.edu.cn/ius/stable/CentOS/6/$basearch  # CentOS 6https://mirrors.tuna.tsinghua.edu.cn/ius/stable/Redhat/6/$basearch  # RHEL 6https://mirrors.tongji.edu.cn/ius/stable/CentOS/6/$basearch         # CentOS 6https://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=iusrepobaseurl=https://mirrors.tuna.tsinghua.edu.cn/ius/stable/CentOS/6/$basearchgpgcheck=0enable=1

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

yum clean all ; yum makecache 

转载于:https://www.cnblogs.com/f-ck-need-u/p/8494992.html

你可能感兴趣的文章
【QC】安装
查看>>
628. Maximum Product of Three Numbers
查看>>
log4j Spring aop 注解的日志管理
查看>>
Spring cloud实战 从零开始一个简单搜索网站_Hystrix断路由的实现(三)
查看>>
Android服务Service
查看>>
sqlalchemy学习(一)
查看>>
silverlight Image Source URI : 一个反斜杠引发的血案
查看>>
Windows Phone开发(35):使用Express Blend绘图 转:http://blog.csdn.net/tcjiaan/article/details/7493010...
查看>>
Windows Phone开发(33):路径之其它Geometry 转:http://blog.csdn.net/tcjiaan/article/details/7483835...
查看>>
Android入门(9)AudioRecord和AudioTrack类的使用【转】http://blog.sina.com.cn/s/blog_6309e1ed0100j1rw.html...
查看>>
mybatis整合Spring编码
查看>>
第七章 路由 68 路由-前端路由和后端路由的概念
查看>>
dpkg包管理
查看>>
前端JS利用canvas的drawImage()对图片进行压缩
查看>>
一键切换皮肤的解决思想及iframe嵌套时寻找下级iframe的方法
查看>>
van-dialog 组件调用 报错
查看>>
VC++中的__super::
查看>>
DS1-14
查看>>
c# Mongodb两个字段不相等 MongoDB原生查询
查看>>
排序算法-冒泡排序
查看>>