美文网首页
yum配置清华镜像源

yum配置清华镜像源

作者: 在阳光下睡觉 | 来源:发表于2022-05-18 14:32 被阅读0次

https://mirrors.tuna.tsinghua.edu.cn/help/centos/

直接使用命令行下载配置文件

sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
         -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://mirrors.tuna.tsinghua.edu.cn|g' \
         -i.bak \
         /etc/yum.repos.d/CentOS-*.repo

复制粘贴

##mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
##vim /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配置清华镜像源

    https://mirrors.tuna.tsinghua.edu.cn/help/centos/[https:/...

  • UBUNTU--镜像源备份

    镜像源配置文件位置##### 清华源##### 163源##### 官方源#####

  • Linux系统安装MongoDB数据库

    1、查看 Linux 系统版本 2、配置 yum 镜像仓库源 配置文件如下: 3、更新 yum 源仓库 4、使用 ...

  • CentOS7-yum源配置

    1.查看yum源 显示如下 可以看到yum的源使用的是清华大学的镜像源,扩展和更新使用的是则是另一个镜像源。 2....

  • CentOS笔记

    yum常用命令 yum配置本地源 配置RPM源 挂载系统ISO镜像 (将ISO文件上传到/usr/local) 修...

  • CentOS7 更改 yum 源和安装 python3.7

    更改为清华大学 yum 源镜像配置 ,查看此处 以下主要参考该博客,进行了省略,更改和补充 运行命令,安装依赖 运...

  • 网络http的yum源

    网络http的yum源 配置网络http的yum源比较简单,我们先到CentOS官方的yum源镜像网址选择合适的y...

  • Linux 配置国内阿里yum源、docker配置阿里加速镜像

    yum配置阿里镜像源 访问这个阿里镜像站,点击centoshttps://developer.aliyun.com...

  • 安装docker

    安装docker 添加docker的yum源 配置镜像加速器:自由选择 更新yum源缓存, 安装docker-ce...

  • CentOS-7服务器基础环境搭建

    一、更换阿里云yum镜像 1.备份本地yum源 2 获取阿里yum源配置文件 更新cache 查看 二、基础工具安...

网友评论

      本文标题:yum配置清华镜像源

      本文链接:https://www.haomeiwen.com/subject/qrdaurtx.html