RHEL的yum是要給錢才能用的,想要不給錢的用,就把原裝yum替換為centos的yum1.查看原有yum包rpm -qa|grep yumyum-langpacks-0.4.2-7.el7.noarchyum-metadata-parser-1.1.4-10.el7.x86_64yum-rhn-... ...
RHEL的yum是要給錢才能用的,想要不給錢的用,就把原裝yum替換為centos的yum
1.查看原有yum包
rpm -qa|grep yum
yum-langpacks-0.4.2-7.el7.noarch yum-metadata-parser-1.1.4-10.el7.x86_64 yum-rhn-plugin-2.0.1-10.el7.noarch yum-3.4.3-158.el7.noarch PackageKit-yum-1.1.5-1.el7.x86_64 yum-utils-1.1.31-45.el7.noarch
2.卸載原yum包
rpm -qa|grep yum|xargs rpm -e --nodeps
3.創建下載路徑,下載centos7.5 yum包
mkdir /tmp/pkg && cd /tmp/pkg
wget http://mirrors.163.com/centos/7.5.1804/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm wget http://mirrors.163.com/centos/7.5.1804/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7.5.1804/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
4.安裝
rpm -ivh yum-*
5.替換原源
cd /etc/yum.repos.d/ && rm -rfv *
6.下載163源
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
7.將下載好的文件中的 $releasever 全部修改為目標版本 7.5.1804
8.重建緩存
yum clean all && yum makecache
yum repolist all