RedHat (Red Hat) yum cannot use the solution, redhatyum

Source: Internet
Author: User

RedHat (Red Hat) yum cannot use the solution, redhatyum

Because RedHat is a commercial version, the yum program cannot be used because it is not registered (in linux, yum is an "artifact" for installing software "). In this case, the CentOS address can be replaced. The following describes how to handle the problem step by step:

1. Delete yum-related files that come with RedHat

1. File Location:/etc/yum. conf and/etc/yum. repo. d/rhel-debuginfo.repo;

2. You can delete the file through FTP or directly use commands.

  

Ii. reconfigure yum-Related Files

1. Configure yum. conf, create the yum. conf file, and then edit it;

  

Yum. conf content, which can be copied directly, as follows:

[main]cachedir=/var/cache/yumkeepcache=1debuglevel=2logfile=/var/log/yum.logpkgpolicy=newestdistroverpkg=redhat-releasetolerant=1exactarch=1obsoletes=1gpgcheck=1plugins=1metadata_expire=1800

After the paste is complete, save it. You can run the command to check whether the data is consistent.

  

2, configure the rhel-debuginfo.repo, create a rhel-debuginfo.repo file, and then edit it (this article takes CentOS5 64-bit address prevail );

The specific operation is the same as 1. Here, only the content is shown as follows:

[base]name=centos-5 - Basebaseurl=http://centos.ustc.edu.cn/centos/5/os/x86_64/# the other site:# you can find more site in: ?id=13enabled=1gpgcheck=1gpgkey=http://centos.ustc.edu.cn/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5#released updates[update]name=CentOS-5 - Updatesbaseurl=http://mirror.centos.org/centos/5/updates/x86_64/gpgcheck=1gpgkey=http://centos.ustc.edu.cn/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5#packages used/produced in the build but not released[addons]name=CentOS-5 - Addonsbaseurl=http://mirror.centos.org/centos/5/addons/$basearch/gpgcheck=1gpgkey=http://centos.ustc.edu.cn/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5#additional packages that may be useful[extras]name=CentOS-5 - Extrasbaseurl=http://mirror.centos.org/centos/5/extras/$basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4#additional packages that extend functionality of existing packages[centosplus]name=CentOS-5 - Plusbaseurl=http://mirror.centos.org/centos/5/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://centos.ustc.edu.cn/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5#contrib - packages by Centos Users[contrib]name=CentOS-5 - Contribbaseurl=http://mirror.centos.org/centos/5/contrib/$basearch/gpgcheck=1enabled=0gpgkey=http://centos.ustc.edu.cn/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5#packages in testing[testing]name=CentOS-5 - Testingbaseurl=http://mirror.centos.org/centos/5/testing/$basearch/gpgcheck=1enabled=0gpgkey=http://centos.ustc.edu.cn/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5

NOTE: If 32 is the system, replace all X86_64 with i386.

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.