“CentOS更换源”的版本间的差异
(创建页面,内容为“category:IS * Centos 7 更换源: ** 备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup ** 下载Repo文件 wget -O /etc/yum…”) |
|||
第7行: | 第7行: | ||
*** yum clear all | *** yum clear all | ||
*** yum makecache | *** yum makecache | ||
+ | |||
+ | * Centos 8 更换源: | ||
+ | ** 备份 | ||
+ | *** cp /etc/yum.repos.d/CentOS-AppStream.repo /etc/yum.repos.d/CentOS-AppStream.repo_bak | ||
+ | *** cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak | ||
+ | *** cp /etc/yum.repos.d/CentOS-Extras.repo /etc/yum.repos.d/CentOS-Extras.repo_bak | ||
+ | ** 修改CentOS-AppStream.repo | ||
+ | *** # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra | ||
+ | *** baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/ | ||
+ | ** 修改CentOS-Base.repo | ||
+ | *** # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra | ||
+ | *** baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/ | ||
+ | ** 修改CentOS-Extras.repo | ||
+ | *** # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra | ||
+ | *** baseurl=https://mirrors.aliyun.com/centos/8.0.1905/extras/x86_64/os/ | ||
+ | ** 完成后执行 | ||
+ | *** dnf clear all | ||
+ | *** dnf makecache |
2024年12月19日 (四) 20:19的最新版本
- Centos 7 更换源:
- 备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
- 下载Repo文件 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- 完成后执行
- yum clear all
- yum makecache
- Centos 8 更换源:
- 备份
- cp /etc/yum.repos.d/CentOS-AppStream.repo /etc/yum.repos.d/CentOS-AppStream.repo_bak
- cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
- cp /etc/yum.repos.d/CentOS-Extras.repo /etc/yum.repos.d/CentOS-Extras.repo_bak
- 修改CentOS-AppStream.repo
- 修改CentOS-Base.repo
- 修改CentOS-Extras.repo
- 完成后执行
- dnf clear all
- dnf makecache
- 备份