• centos7修改软件源


    # 清除缓存
    yum clean all

    sudo rm -rf /var/cache/yum

    # 卸载epel仓库

    yum remove epel-release

    # 删除所有旧仓库文件
    # 注意,如有其它仓库文件请自行重装或选择性删除

    rm -rf /etc/yum.repos.d/*

    vi /etc/yum.repos.d/CentOS-Base.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-$releasever - Base
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

    #released updates
    [updates]
    name=CentOS-$releasever - Updates
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

    # 建立缓存
    yum makecache
    # 重新安装EPEL仓库
    yum install epel-release

    参考博客:https://blog.csdn.net/w958660278/article/details/80615048

  • 相关阅读:
    SQL 2012 Group By Rollup, Grouping
    SQL 2012 Restore HeaderOnly
    EasyPerformanceCounterHelper
    并发异步处理队列 .NET 4.5+ (改进性能计数器) 2013-11-16
    CodeTimerPerformance EasyPerformanceCounterHelper .NET 4.5
    csc.rsp Nuget MVC/WebAPI 5.0、SignalR 2.0、Rx、Json、Azure、EntityFramework、OAuth、Spatial
    MEF Parts Sample
    免费超高速卡片式病人基本信息列表控件
    微观云计算系列谈之一:基本概念
    golang 无法将Slice类型[]a 转换为 Slice[]b
  • 原文地址:https://www.cnblogs.com/cyf18/p/13920977.html
Copyright © 2020-2023  润新知