Redhat6.0 Yum problem solving method set to centos Yum Source

Source: Internet
Author: User

Because the RedHat Yum online update is charged, it cannot be used if it is not registered. to use it, you need to uninstall the RedHat yum, restart the installation, and configure other sources, the detailed process is as follows:
(The version is 64-bit, and the name of the corresponding package must be changed when the 32-bit version is used)
1. Delete the original Yum of RedHat. 
Rpm-AQ | grep Yum | xargs rpm-e -- nodeps

2. Download the yum Installation File
Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
Wget http://mirrors.163.com/centos/6/ OS /x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

3. Install yum

Rpm-IVH python-iniparse-0.3.1-2.1.el6.noarch.rpm
Rpm-IVH yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
Rpm-IVH yum-3.2.27-14.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

Note that the last two packages must be installed at the same time, otherwise they will depend on each other.

4. Update the repo File

MV/etc/yum. Repos. d/rhel-debuginfo.repo/etc/yum. Repos. d/rhel-debuginfo.repo.repo.bak
This file may not exist here. It does not matter. If there is no such file, it cannot be executed.

VI/etc/yum. Repos. d/rhel-debuginfo.repo

Content:

[Base]
Name = centos-$ releasever-Base
Baseurl = http://mirrors.163.com/centos/6/ OS /?basearch/
Gpgcheck = 1
Gpgkey = http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

# Released updates
[Updates]
Name = centos-$ releasever-Updates
Baseurl = http://mirrors.163.com/centos/6/updates/?basearch/
Gpgcheck = 1
Gpgkey = http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

# Packages used/produced in the build but not released
# [Addons]
# Name = centos-$ releasever-Addons
# Baseurl = http://mirrors.163.com/centos/?releasever/addons/?basearch/
# Gpgcheck = 1
# Gpgkey = http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
# Additional packages that may be useful
[Extras]
Name = centos-$ releasever-extras
Baseurl = http://mirrors.163.com/centos/6/extras/?basearch/
Gpgcheck = 1
Gpgkey = http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
# Additional packages that extend functionality of existing packages
[Centosplus]
Name = centos-$ releasever-plus
Baseurl = http://mirrors.163.com/centos/6/centosplus/?basearch/
Gpgcheck = 1
Enabled = 0

5. Yum clean all

6. Yum install Vim # Can I test it?

========================================================== ================================================== ======================

[Set the local image as the yum source]

1. mkdir/mnt/CDROM

2 Mount/dev/CDROM/mnt/CDROM # images and CDs are hung

3 mkdir/home/RedHat-ISO

4 cp-RF/mnt/CDROM/*/home/RedHat-ISO # copy the content in the CD to a specific path

5 VI/etc/yum. Repos. d/rhel-debuginfo.repo # edit repo File

Add the following content:

[Rhel_6_iso]
Name = Local ISO
Baseurl = file: // home/RedHat-ISO/
Gpgcheck = 1
Gpgkey = file: // home/RedHat-ISO/RPM-GPG-KEY-CentOS-6
# Change the gpgkey file to the file name in the ISO image.


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.