centos7 更新阿里YUM源

1 备份本地源

  • mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak

2 获取阿里源配置文件

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

3 更新cache

  • yum makecache

4 使用阿里源更新你的包

  • yum -y update

猜你喜欢

转载自www.cnblogs.com/niuniu0108/p/12762459.html