• redhat 6.8 配置*yum源


    1.检查是否安装yum包

    rpm -qa |grep yum

    2. 删除自带的yum包

    rpm -qa|grep yum|xargs rpm -e --nodeps

    3. 下载yum包

    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
    

    4.解压yum包

    rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
    rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
    rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
    

    5.替换yum源

    cd  /etc/yum.repos.d/
    

     

    mv rhel-source.repo rhel-source.repo.bak
    
    vi  rhel-source.repo
    

     

    #rhel-source.repo
    
    #
    
    # The mirror system uses the connecting IP address of the client and the
    
    # update status of each mirror to pick mirrors that are updated to and
    
    # geographically close to the client.  You should use this for CentOS updates
    
    # unless you are manually picking other mirrors.
    
    #
    
    # If the mirrorlist= does not work for you, as a fall back you can try the
    
    # remarked out baseurl= line instead.
    
    #
    
    #
    
     
    
    [base]
    
    name=CentOS-6 - Base - 163.com
    
    baseurl=http://mirrors.163.com/centos/6/os/$basearch/
    
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
    
    gpgcheck=1
    
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
     
    
    #released updates
    
    [updates]
    
    name=CentOS-6 - Updates - 163.com
    
    baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
    
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
    
    gpgcheck=1
    
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
     
    
    #additional packages that may be useful
    
    [extras]
    
    name=CentOS-6 - Extras - 163.com
    
    baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
    
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
    
    gpgcheck=1
    
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    

    7. 清理并重建缓存 

    yum clean all

    yum makecache

    8. 更新yum

    yum update

     

      

  • 相关阅读:
    构造与析构的次序
    为什么析构函数常声明为虚函数
    偏移数组的二分查找
    字符串循环右移N位
    const 补充
    对类 sizeof
    指针与引用
    python小练习
    初学数据挖掘——相似性度量(一)
    每天进步一点点(二)
  • 原文地址:https://www.cnblogs.com/jycjy/p/10999205.html
Copyright © 2020-2023  润新知