RHEL6修改源 taro Posted on Mar 18 2021 # 删除原yum ```bash rpm -qa|grep yum|xargs rpm -e --nodeps ``` # 安装新的yum ```bash wget --no-check-certificate https://mirrors.cloud.tencent.com/centos/6/os/x86_64/Packages/rpm-4.8.0-59.el6.x86_64.rpm wget --no-check-certificate https://mirrors.cloud.tencent.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm wget --no-check-certificate https://mirrors.cloud.tencent.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm wget --no-check-certificate https://mirrors.cloud.tencent.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm wget --no-check-certificate https://mirrors.cloud.tencent.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm wget --no-check-certificate https://mirrors.cloud.tencent.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm rpm -Uvh rpm-4.8.0-59.el6.x86_64.rpm --nodeps rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm --nodeps rpm -Uvh python-iniparse-0.3.1-2.1.el6.noarch.rpm --nodeps # rpm -ivh rpm -Uvh --force --nodeps *rpm ``` 新建`etc/yum.repos.d/CentOS-Base.repo` ```bash wget -O /etc/yum.repos.d/CentOS-Base.repo --no-check-certificate https://mirrors.cloud.tencent.com/repo/centos6_base.repo cd /etc/yum.repos.d/ sed -i 's/\$releasever/6/' CentOS-Base.repo ``` ## 刷新缓存 ```bash #清理yum缓存,使设置生效 yum makecache ``` >https://blog.csdn.net/qq_34182808/article/details/80345476 >https://zhuanlan.zhihu.com/p/111581571 >https://juejin.cn/post/6844903873111392270 windows 后门 Linux 开发学习 (三)