咱们在日常时候yum命令安装软件时,有时会产生不稳定或下载慢的情况,这个时候你就可以试着将yum源换成阿里的,话不多说,上步骤:
- 备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup - 替换
- centos6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo - centos7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo - centos8
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
- centos6
- 更新yum源
- yum clean all
- yum makecache
- yum update
至此,配置完成~