zoukankan      html  css  js  c++  java
  • RedHat7.4配置yum网络源

     本次RedHat版本为:Red Hat Enterprise Linux Server release 7.4 (Maipo)。

        将RedHat7.4的yum源替换为免费的CentOS对应版本yum源步骤如下,注意版本匹配,此处CentOS的yum源版本也为7.4

    yum网络源

    1. 首先删除redhat原有的yum
    rpm -aq | grep yum | xargs rpm -e --nodeps
    rpm -aq | grep python-iniparse | xargs rpm -e --nodeps
        查看是否已经卸载完成:

    rpm -aq | grep yum
    rpm -aq | grep python-iniparse
    2. 下载yum安装包
    wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-154.el7.centos.noarch.rpm
    wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
    wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
    wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm
    3. 安装下载的rpm包
    rpm -ivh python-iniparse-0.4-9.el7.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm yum-3.4.3-154.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm
    4. 创建文件/etc/yum.repos.d/CentOS-Base.repo
    可以使用网易云或阿里云镜像站点:

    网易云镜像站点:

    ase]
    name=CentOS-$releasever - Base
    baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
    gpgcheck=1
    gpgkey=https://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

    [updates]
    name=CentOS-$releasever - Updates
    baseurl=https://mirrors.aliyun.com/centos/7/updates/x86_64/
    gpgcheck=1
    gpgkey=https://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

    [extras]
    name=CentOS-$releasever - Extras
    baseurl=https://mirrors.aliyun.com/centos/7/extras//x86_64/
    gpgcheck=1
    gpgkey=https://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

    [centosplus]
    name=CentOS-$releasever - Plus
    baseurl=https://mirrors.aliyun.com/centos/7/centosplus//x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

    5. yum clean all
    6. yum makecache(生成本地缓存)
    附:yum源变更说明
    经查从2018年05月24日起阿里云和网易云镜像站点中对于CentOS 7.4.1708版本的yum源已经不做支持,在镜像站点中附带了一个readme文件说明如下:

    解决该站点镜像无法使用的方式有如下两种:

    方式一:将上述第4点中所有的7.4.1708替换为7

    方式二:将上述第4点中所有的mirrors.163.com或mirrors.aliyun.com替换为vault.centos.or

     

  • 相关阅读:
    rMATs分析single-end 数据,结果文件为空?
    Error in inherits(x, "theme") : argument "e2" is missing, with no default
    R 变量名开头不能为数字
    linux 下的通配符和正则表达式不一样
    samtools的一些问题
    Error in C(1, 2) : object not interpretable as a factor
    grep -w 正确使用,结果却不正确的原因之一
    慎用rm命令和*
    定义默认字典值为列表类型
    C语言考题:Find the key in the picture,good luck..
  • 原文地址:https://www.cnblogs.com/qingbai/p/11896937.html
Copyright © 2011-2022 走看看