升级 redhat6 的 yum 源替换为 centos 源
1、查看源yum并卸载源yum
rpm -qa |grep yum
rpm -qa|grep yum|xargs rpm -e --nodeps
2、下载centos yum 安装包
wget https://vault.centos.org/6.10/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm --no-check-certificate
wget https://vault.centos.org/6.10/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm --no-check-certificate
wget https://vault.centos.org/6.10/os/x8664/Packages/yum-metadata-parser-1.1.2-16.el6.x8664.rpm --no-check-certificate
wget https://vault.centos.org/6.10/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm --no-check-certificate
3、安装
rpm -ivh python*
rpm -ivh yum*
4、删除源,源置
cd /etc/yum.repos.d/ && rm -f *.repo
5、清理软件源
yum clean all
6、配置新源:编辑文件:vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-6
failovermethod=priority
#这个是官方的源 但是网上感人
#baseurl=https://vault.centos.org/6.10/os/x86_64/
#搜狐源 网速200k左右
baseurl=http://mirrors.sohu.com/centos/6.10/os/x86_64/
gpgcheck=0
7、建立源数据缓存
yum makecache
评论