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

有很多国内很多镜像站点都提供了各类仓库的镜像站点,个人感觉比较全的是阿里云http://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分支的包。

配置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=
enable=

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

yum clean all ; yum makecache 

为Linux配置常用源:epel和IUS的更多相关文章

  1. Linux 配置163yum源epel 源

    今天一个小伙伴询问博主,想换个163源(阿里源.亚马逊应该都是一样,博主没有一一验证)怎么换!博主当然兴致勃勃的准备好了指点小伙伴...但是,你没猜错,打脸了.而且最后还是和小伙伴一起配置好的,所以就 ...

  2. centos 系统软件包管理 yum 本地yum配置 扩展源epel rpm 清除yum缓存 yum provides "*/vim" 第十节课

    centos  系统软件包管理  yum 本地yum配置  扩展源epel  rpm  清除yum缓存  yum provides "*/vim"   第十节课 你不能保证可逆化操 ...

  3. Linux 配置yum源.

    Linux 配置yum源. 环境:虚拟机中安装了RedHat ,在进行安装mariadb的时候,出现如下错误.是因为yum源的问题,需要进行配置yum源.本教程是配置本地yum源. [root@loc ...

  4. Linux 配置yum源(互联网)

    Linux 配置yum源(互联网) 环境:操作系统Redhat 7.5 1.卸载现有的yum源 rpm -qa|grep yum|xargs rpm -e --nodeps     #移除与原yum有 ...

  5. linux配置yum源

    yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...

  6. Linux配置yum源(离线和在线)

    配置yum源有2种方法,一种是离线yum源,另外一种是在线yum源. 一.离线yum源,基于安装光盘提供的安装仓库. 建立一个属于仓库文件夹 mkdir /media/zidong cd /media ...

  7. Linux 配置常用工具?

    常用的软件在linux上进行配置: 修改HOSTANME vi /etc/sysconfig/network 修改HOSTNAME和IP的映射 vi /etc/hosts 关闭防火墙 service ...

  8. linux配置yum源、mount及yum命令

    配置yum源:  在/mnt目录下新建一个空的目录,名为rhel. [root@localhost mnt]# mkdir rhel 然后 [root@localhost Packages]# cd ...

  9. Linux 配置最新的epel源

    一.Centos6 yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm 二.Cento ...

随机推荐

  1. Linux 下 ftp的使用

    最近需要在Linux上搭建FTP服务,通过网上的一些大神学习了一些新知识,在这个做一个总结: Linux 下FTP 为 vsftp (linux red hat)1.FTP配置路径:/etc/vsft ...

  2. JS 控制输入框输入表情emoji 显示在页面上

    问题描述: 最近做一个评论回复的功能遇到了用户输入框输入表情,存入数据库的时候转变成了问号??? 起初为了避免这个问题,做了一个过滤表情的控制 var inputText = $('#pinglun' ...

  3. prime distance on a tree(点分治+fft)

    最裸的点分治+fft,调了好久,太菜了.... #include<iostream> #include<cstring> #include<cstdio> #inc ...

  4. latex 希腊字母表示

    http://blog.sina.com.cn/s/blog_5e16f1770100lxq5.html

  5. Node selenium-webdriver

    Selenium-webdriver基本使用 准备 ① node.js 的安装和配置略 ② Selenium-webdriver npm install -save selenium-webdrive ...

  6. Leetcode_5.最长回文子串

    最长回文子串 题目描述: 给定一个字符串 s,找到 s 中最长的回文子串.你可以假设 s 的最大长度为 1000. 示例 1: 输入: "babad" 输出: "bab& ...

  7. 11-Python操作excel

    1.python操作excel需要用到的库 python操作excel主要用到xlrd和xlwt这两个库,即xlrd是读excel,xlwt是写excel的库.可以直接pip安装这两个库,pip in ...

  8. Openvswitch手册(9): Flow

    这一节我们将flow table flow table主要由ovs-ofctl命令操作 ovs-ofctl可以走和openflow controller一样的协议: ssl:ip[:port]: Th ...

  9. ASP.NET Core MVC 源码学习:详解 Action 的匹配

    前言 在 上一篇 文章中,我们已经学习了 ASP.NET Core MVC 的启动流程,那么 MVC 在启动了之后,当请求到达过来的时候,它是怎么样处理的呢? 又是怎么样把我们的请求准确的传达到我们的 ...

  10. 谈谈 TCP 的 TIME_WAIT

    由来 最近有同事在用 ab 进行服务压测,到 QPS 瓶颈后怀疑是起压机的问题,来跟我借测试机,于是我就趁机分析了一波起压机可能成为压测瓶颈的可能,除了网络 I/O.机器性能外,还考虑到了网络协议的问 ...