配置yum源

时间:2021-07-21 00:15:14

 

1.安装wget

  yum install -y wget

2.备份/etc/yum.repos.d/CentOS-Base.repo

  cd /etc/yum.repos.d/

  mv CentOS-Base.repo CentOS-Base.repo.back

3.下载阿里云的CentOS-6.repo文件

  wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

4.重新加载yum

  yum clean all

  yum makecache