zoukankan      html  css  js  c++  java
  • redhat7 配置使用centos的yum源

    1.查看RHEL是否安装了yum:

    rpm -qa |grep yum

    2 删除redhat自带的yum包:

    rpm -qa|grep yum|xargs rpm -e --nodeps(不检查依赖,直接删除rpm包)

    rpm -qa |grep yum

    3.下载新的yum包。使用Centos7的yum包:

    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm

    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm

    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-50.el7.noarch.rpm

    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-9.el7.noarch.rpm

    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/python-chardet-2.2.1-1.el7_1.noarch.rpm

    wget https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm

    rpm -ivh python-urlgrabber-3.10-9.el7.noarch.rpm

    rpm -ivh python-chardet-2.2.1-1.el7_1.noarch.rpm

    rpm -ivh python-kitchen-1.1.1-5.el7.noarch.rpm

    rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm yum-utils-1.1.31-50.el7.noarch.rpm yum-3.4.3-161.el7.centos.noarch.rpm

    4.更换yum源。使用阿里云的源

       cd  /etc/yum.repos.d

       mv redhat.repo redhat.repo.bak

    CentOS 7
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    修改CentOS-Base.repo文件中的$releasever全部替换为版本号 7
    mv CentOS-Base.repo redhat.repo
    运行yum makecache生成缓存
    yum clean all
    yum makecache
    yum update
  • 相关阅读:
    HDU-6801 2020HDU多校第三场T11 (生成函数)
    [HDU-6791] 2020HDU多校第三场T1(回文自动机)
    回文自动机 (PAM,Palindrome Automaton)
    字符串的Period(周期),Border
    「APIO2019」路灯 (K-D Tree / 树套树 / CDQ + 树状数组)
    「APIO2019」桥梁(询问分块+并查集)
    「APIO2019」奇怪装置
    「APIO2018」选圆圈(K-D Tree/CDQ+Set)
    堆小结
    【[HNOI/AHOI2018]毒瘤】
  • 原文地址:https://www.cnblogs.com/yuanqc/p/10565638.html
Copyright © 2011-2022 走看看