centos7更换为阿里源

永真

1、备份本地源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
1下载阿里源

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.repo
2更新epel仓库
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
3、清理缓存重新生成缓存
yum clean all
yum makecache
4、更新最新源设置

yum update -y

版权协议须知!

本篇文章来源于 网络转载 ,如本文章侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意

none

3512 0 2023-10-17


分享:
服务器出租,服务器架设等都可以联系我QQ3354446238
  • 默认
  • 护眼
  • 夜晚
  • 壁纸
  • 默认