- Alpine Linux 源使用帮助
- AOSC OS 源使用帮助
- AOSP 镜像使用帮助
- Arch Linux 源使用帮助
- Arch Linux CN 源使用帮助
- Arch Linux ARM 源使用帮助
- Black Arch 源使用帮助
- CentOS 源使用帮助
- EPEL 源使用帮助
- Chakra 源使用帮助
- Debian 源使用帮助
- Debian Security 源使用帮助
- Debian CD 源使用帮助
- Debian-cdimage 源使用帮助
- Debiancn 源使用帮助
- Deb Multimedia 源使用帮助
- Fedora 源使用帮助
- FreeBSD 源使用帮助
- FreeBSD pkg 源使用帮助
- FreeBSD ports 源使用帮助
- RPM Fusion 源使用帮助
- Gentoo 源使用帮助
- Gentoo Portage 源使用帮助
- Kali Linux 源使用帮助
- Linux Mint 源使用帮助
- Mageia 源使用帮助
- Manjaro Linux 源使用帮助
- MSYS2 源使用帮助
- openSUSE 源使用帮助
- OpenWRT/LEDE 源使用帮助
- PackMan 源使用帮助
- Proxmox 源使用帮助
- Raspberry Pi OS Images 使用帮助
- Raspbian 源使用帮助
- Scientific Linux 镜像使用帮助
- Termux 源使用帮助
- Trisquel 源使用帮助
- Ubuntu 源使用帮助
- Ubuntu Ports 源使用帮助
- Ubuntu Old Releases 源使用帮助
- Ubuntu Releases 源使用帮助
- Ubuntu CD Image 源使用帮助
- Ubuntu Cloud Images 源使用帮助
- Hackage 源使用帮助
- Julia 镜像使用帮助
- Node 源使用帮助
- Nodesource 源使用帮助
- PyPI 镜像源使用帮助
- Rubygems 源使用帮助
- Rust Crates 源使用帮助
- Rust Toolchain 反向代理使用帮助
- Stackage 源使用帮助
- Anaconda 源使用帮助
- Homebrew 源使用帮助
- CPAN 镜像使用帮助
- CRAN 镜像使用帮助
- Docker CE 源使用帮助
- Docker Hub 源使用帮助
- Eclipse 镜像使用帮助
- Emacs ELPA 源使用帮助
- Homebrew Bottles 源使用帮助
- Homebrew Core 源使用帮助
- Homebrew Cask 源使用帮助
- Homebrew Cask Versions 源使用帮助
- Qt 镜像使用帮助
- Linux 内核源码镜像使用帮助
- Linuxbrew Bottles 源使用帮助
- Linuxbrew Core 源使用帮助
- MariaDB 源使用帮助
- Nix Channels 源使用帮助
- Raspberrypi 源使用帮助
- ROS 源使用帮助
- XBMC/Kodi 镜像使用帮助
- 科大源同步方法与注意事项
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
CentOS 源使用帮助
地址
https://mirrors.ustc.edu.cn/centos/
说明
CentOS 软件源
收录架构
x86_64, i386
收录版本
7, 8
使用说明
警告
操作前请做好相应备份。
对于 CentOS 8,使用以下命令替换默认的配置
sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=https://mirrors.ustc.edu.cn/centos|g' \ -i.bak \ /etc/yum.repos.d/CentOS-Linux-AppStream.repo \ /etc/yum.repos.d/CentOS-Linux-BaseOS.repo \ /etc/yum.repos.d/CentOS-Linux-Extras.repo \ /etc/yum.repos.d/CentOS-Linux-PowerTools.repo \ /etc/yum.repos.d/CentOS-Linux-Plus.repo
对于 CentOS 7,使用以下命令替换默认配置
sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://mirror.centos.org/centos|baseurl=https://mirrors.ustc.edu.cn/centos|g' \ -i.bak \ /etc/yum.repos.d/CentOS-Base.repo
以上命令只替换了默认启用的仓库。替换之后请运行 yum makecache
更新缓存。
以下是替换之后的文件:
警告
以下给出的 CentOS-Linux-PowerTools.repo
与 CentOS-Linux-Plus.repo
设置了默认为停用状态。如需启用,请将 enabled=0
改为 enabled=1
。
CentOS 8:
/etc/yum.repos.d/CentOS-Linux-BaseOS.repo
文件:# CentOS-Linux-BaseOS.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are 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, you can try the commented out # baseurl line instead. [baseos] name=CentOS Linux $releasever - BaseOS #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/BaseOS/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
/etc/yum.repos.d/CentOS-Linux-Extras.repo
文件:# CentOS-Linux-Extras.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are 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, you can try the commented out # baseurl line instead. [extras] name=CentOS Linux $releasever - Extras #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
/etc/yum.repos.d/CentOS-Linux-AppStream.repo
文件:# CentOS-Linux-AppStream.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are 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, you can try the commented out # baseurl line instead. [appstream] name=CentOS Linux $releasever - AppStream #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/AppStream/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
/etc/yum.repos.d/CentOS-Linux-PowerTools.repo
文件:# CentOS-Linux-PowerTools.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are 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, you can try the commented out # baseurl line instead. [powertools] name=CentOS Linux $releasever - PowerTools #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/PowerTools/$basearch/os/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
/etc/yum.repos.d/CentOS-Linux-Plus.repo
文件:# CentOS-Linux-Plus.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are 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, you can try the commented out # baseurl line instead. [plus] name=CentOS Linux $releasever - Plus #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/os/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
CentOS 7:
/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 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/ 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 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
相关链接
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论