• 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
  • 相关阅读:
    BOM、DOM
    logstash进程杀不掉
    awk正则匹配nginx日志【原创】
    14个最常见的Kafka面试题及答案【转】
    gpk-update-icon占用CPU及清除【原创】
    tracert和traceroute使用
    Centos 6.4搭建git服务器【转】
    ELK&ElasticSearch5.1基础概念及配置文件详解【转】
    Nginx实现404页面的几种方法【转】
    MySQL数据库的“十宗罪”【转】
  • 原文地址:https://www.cnblogs.com/hongyanee/p/3300938.html
Copyright © 2020-2023  润新知