kingschan1204 / blog

个人技术blog
https://github.com/kingschan1204/blog/issues
1 stars 1 forks source link

centos7 使用阿里云yum源 #15

Open kingschan1204 opened 6 years ago

kingschan1204 commented 6 years ago
  1. 备份原来的yum源

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

  1. 下载阿里云的CentOS-Base.repo 到/etc/yum.repos.d/

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

  1. 清理缓存

sudo yum clean all

  1. 生成新的缓存

sudo yum makecache