• Linux yum源配置


    文件名为 CentOS7-Base-163.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-7 - Base - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=os
    baseurl=http://mirrors.163.com/centos/7/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
    
    #released updates
    [updates]
    name=CentOS-7 - Updates - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=updates
    baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
    
    #additional packages that may be useful
    [extras]
    name=CentOS-7 - Extras - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=extras
    baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
    
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-7 - Plus - 163.com
    baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
    
    proxy=http://172.28.88.2:80
    

    将文件放在 /etc/yum.repos.d 目录下,如果该目录下有同名文件,就先把同名文件保存一下,再把文件放过去

    完成上述操作以后,再使用yum,就能够正常访问国内的yum源

  • 相关阅读:
    中文繁体简体互换试验
    msSQL2005数据库备份
    C#实现Base64编码与解码
    C#中正则表达式的高级应用
    滚动条样式锦集
    远程MSMQ
    Silverlight+WCF 新手实例 象棋 主界面事件区求和认输(三十二)
    MSSQL 2005 数据库变成可疑状态
    CYQ.Data 轻量数据层之路 华丽升级 V1.3出世(五)
    CYQ.Data 轻量数据层之路 终极升级(二)
  • 原文地址:https://www.cnblogs.com/xuyong437/p/11201930.html
Copyright © 2020-2023  润新知