Replace the red Hat Enterprise Linux 7 64-bit Yum for CentOS version

Source: Internet
Author: User

    • Check out what Redhat's original Yum packages are:
[Email protected] ~]# Rpm-qa|grep Yumyum-utils-1.1.31-24.el7.noarchyum-langpacks-0.4.2-3.el7.noarchyum-metadata-parser-1.1.4-10.el7.x86_ 64yum-rhn-plugin-2.0.1-4.el7.noarchpackagekit-yum-0.8.9-11.el7.x86_64yum-3.4.3-118.el7.noarch
    • Try to use Xargs to remove these packages
[[email protected] ~]# rpm-qa|grep Yum|xargs rmp-e--nodepsxargs:rmp: no file or directory
    • No Xargs one Delete
[Email protected] ~]# rpm-qa|grep xargs[[email protected] ~]# rpm-e--nodeps yum-utils-1.1.31-24.el7.noarch[[email Prot Ected] ~]# rpm-e--nodeps yum-langpacks-0.4.2-3.el7.noarch[[email protected] ~]# rpm-e--nodeps yum-metadata-parser-1.1 .4-10.el7.x86_64[[email protected] ~]# rpm-e--nodeps yum-rhn-plugin-2.0.1-4.el7.noarch[[email protected] ~]# rpm-e--n Odeps Packagekit-yum-0.8.9-11.el7.x86_64[[email protected] ~]# rpm-e--nodeps rpm-e--nodeps yum-3.4.3-118.el7.noarch[ [Email protected] ~]# Rpm-qa|grep Yum
    • View current operating system version
[Email protected] ~]# Cd/etc[[email protected] etc]# cat redhat-release Red Hat Enterprise Linux Server Release 7.0 (Mai Po
    • Download the CentOS Yum
[[Email protected] ~] #wget http://mirrors.163.com/centos/7/os/x86_64/Packages/ yum-metadata-parser-1.1.4-10.el7.x86_64.rpm [[email protected] ~] #wget http://mirrors.163.com/centos/7/os/x86_64/ packages/yum-3.4.3-150.el7.centos.noarch.rpm [[email protected] ~] #wget http://mirrors.163.com/centos/7/os/x86_64/ packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm
    • Installing CentOS during the Yum installation process found that relying on python-urlgrabber and downloading and installing it python-urlgrabber must first remove the old version
[[email protected] ~]# rpm-e--nodeps python-urlgrabber-3.10-4.el7.noarch[[email protected] ~] #wget http://mirrors.163 . com/centos/7/os/x86_64/packages/python-urlgrabber-3.10-8.el7.noarch.rpm [[email protected] ~] #rpm-IVH python-urlgrabber-3.10-8.el7.noarch.rpm [[email protected] ~] #rpm-IVH yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
    • The last two interdependent so put it together to execute
[[Email protected] ~] #rpm-IVH yum-3.4.3-150.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm
    • Replace the Yum source
[[Email protected] ~] #cd/etc/yum.repos.d/[[email protected] ~] #wget http://mirrors.163.com/.help/ Centos7-base-163.repo Note: You need to replace all $releasever in Centos7-base-163.repo with 7
    • Rebuilding the cache
[[Email protected] ~] #yum clean All[[email protected] ~] #yum Makecache Follow the online steps of the flower, the last step there is a "Yum update", will be all the RPM update to the latest state, For the time being, I feel no need to do it. Final Test yum install succeeded.

Replace the red Hat Enterprise Linux 7 64-bit Yum for CentOS version

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.