CentOS 7 您所在的位置:网站首页 阿里云ali CentOS 7

CentOS 7

2024-06-10 19:30| 来源: 网络整理| 查看: 265

阿里镜像官方地址http://mirrors.aliyun.com/

1、点击官方提供的相应系统的帮助 :_12、查看不同版本的系统操作:_2

下载源1、安装wget yum install -y wget2、下载CentOS 7的repo文件wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo3、更新镜像源清除缓存:yum clean all 生成缓存:yum makecache

更改配置文件(很重要)1、备份CentOS 7系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo命令:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、找到yum源的配置路径cd /etc/yum.repos.d

3、(可以省略该步骤)查看该目录下的所有文件目录:ls_34、打开CentOS-Base.repo文件:vim CentOS-Base.repo

或者

vi CentOS-Base.repo

5、将文件中的所有http开头的地址更改为https(下图中只是列出部分内容,并不完善):_46、更新yum:yum update



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有