• RedHat6.6更新Centos6yum源


    RedHat6.6更新Centos6yum源

    一、    删除自带的RedHat6.6yum源

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

    2-       检查是否删除干净

    rpm –qa|grep yum

    3-       下载新yum源

    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-3.2.29-73.el6.centos.noarch.rpm

    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm

    4-       一起安装避免依赖。

    rpm –ivh *.rpm

    5-       更新yum源。使用163的源。

    vi Centos.repo

    # CentOS-Base.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

    #additional packages that extend functionality of existing packages

    [centosplus]

    name=CentOS-6 - Plus - 163.com

    baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/

    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus

    gpgcheck=1

    enabled=0

    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

    #contrib - packages by Centos Users

    [contrib]

    name=CentOS-6 - Contrib - 163.com

    baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/

    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib

    gpgcheck=1

    enabled=0

    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

    6-       清除原有缓存

    #yum  clean all

    7-       重建缓存,以提高搜索安装软件的速度

    #yum makecache

    8-       更新系统

    #yum –y update

  • 相关阅读:
    IE8发送ajax请求无效
    Qt 桌面服务 QDesktopServices
    Qt 排序 QSort
    使用ehcache缓存可变对象时的注意事项
    Golang微服务入门到精通之路-1-Go之初体验
    机械革命 Code01 笔记本激活 Win10 方法
    IM技术分享:万人群聊消息投递方案的思考和实践
    零基础入门:基于开源WebRTC,从0到1实现实时音视频聊天功能
    剑指 Offer 28. 对称的二叉树
    idea使用
  • 原文地址:https://www.cnblogs.com/flyback/p/5844422.html
Copyright © 2020-2023  润新知