RedHad7.2 更换yum源

rpm -aq | grep yum
rpm -aq | grep yum | xargs rpm -e --nodeps

rpm -aq | grep python-iniparse
rpm -aq | grep python-iniparse | xargs rpm -e --nodeps

  

https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/

python-iniparse-0.4-9.el7.noarch.rpm

yum-3.4.3-167.el7.centos.noarch.rpm

yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

yum-plugin-fastestmirror-1.1.31-53.el7.noarch.rpm

  • 阿里云镜像站点:

[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.aliyun.com/centos/7.4.1708/os/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/7.4.1708/os/x86_64/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.aliyun.com/centos/7.4.1708/updates/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/7.4.1708/os/x86_64/RPM-GPG-KEY-CentOS-7

[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.aliyun.com/centos/7.4.1708/extras//$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/7.4.1708/os/x86_64/RPM-GPG-KEY-CentOS-7

[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.aliyun.com/centos/7.4.1708/centosplus//$basearch/
gpgcheck=1
enabled=0

yum clean all

yum makecache(生成本地缓存)

  

原文地址:https://www.cnblogs.com/Alexr/p/13503641.html