zoukankan      html  css  js  c++  java
  • RHEL/CentOS 6的更新源

    RedHat/CentOS 6 yum repository更新源

     Linux安装软件,rpm方法总会遇到依赖的问题,烦不胜烦。yum install是一个比较方便的安装方式,所以要选择一个好一些yum repository更新源。国内不错的更新源有中科大/搜狐/163.

     国内三个主要的开源镜像站

     (教育网)中科大镜像站:http://mirrors.ustc.edu.cn/
     搜狐镜像站:http://mirrors.sohu.com/
     163镜像站:http://mirrors.163.com/
     

     修改CentOS-Base.repo

     vim /etc/yum.repos.d/CentOS-Base.repo;# 用vim修改CentOS-Base.repo。

     如果用中科大镜像站的yum源,文件内容改为:

    # CentOS-Base.repo
    #
    # This file uses a new mirrorlist system developed by Lance Davis for CentOS.
    # 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-$releasever - Base
    baseurl=http://mirrors.ustc.edu.cn/centos/6/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6
     
    #released updates
    [updates]
    name=CentOS-$releasever - Updates
    baseurl=http://mirrors.ustc.edu.cn/centos/6/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6
     
    #packages used/produced in the build but not released
    #[addons]
    #name=CentOS-$releasever - Addons
    #baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/addons/$basearch/
    #gpgcheck=1
    #gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    baseurl=http://mirrors.ustc.edu.cn/centos/6/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus
    baseurl=http://mirrors.ustc.edu.cn/centos/6/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6
    View Code

     如果用搜狐镜像站的yum源,则改为:

    # CentOS-Base.repo
    #
    # This file uses a new mirrorlist system developed by Lance Davis for CentOS.
    # 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-$releasever - Base
    baseurl=http://mirrors.sohu.com/centos/6/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
     
    #released updates
    [updates]
    name=CentOS-$releasever - Updates
    baseurl=http://mirrors.sohu.com/centos/6/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
     
    #packages used/produced in the build but not released
    #[addons]
    #name=CentOS-$releasever - Addons
    #baseurl=http://mirrors.sohu.com/centos/$releasever/addons/$basearch/
    #gpgcheck=1
    #gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    baseurl=http://mirrors.sohu.com/centos/6/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus
    baseurl=http://mirrors.sohu.com/centos/6/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
    View Code

    如果用163镜像站的yum源,则改为:

    # CentOS-Base.repo
    #
    # This file uses a new mirrorlist system developed by Lance Davis for CentOS.
    # 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-$releasever - Base
    baseurl=http://mirrors.163.com/centos/6/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
     
    #released updates
    [updates]
    name=CentOS-$releasever - Updates
    baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
     
    #packages used/produced in the build but not released
    #[addons]
    #name=CentOS-$releasever - Addons
    #baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
    #gpgcheck=1
    #gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus
    baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
    View Code
  • 相关阅读:
    hdu_5750_Dertouzos(线性筛)
    hdu_5748_Bellovin(LIS)
    Codeforces Round #364 (Div. 2) C.They Are Everywhere
    Codeforces Round #364 (Div. 2) D. As Fast As Possible
    [BZOJ 2456]Mode(神奇的抵销)
    [poj3046]Ant Counting(母函数)
    [poj1742]coin
    [poj3666]Making the Grade(DP/左偏树)
    【POJ各种模板汇总】(写在逆风省选前)(不断更新中)
    [USACO2004][poj1989]The Cow Lineup(乱搞)
  • 原文地址:https://www.cnblogs.com/hongyanee/p/3300938.html
Copyright © 2011-2022 走看看