REDHAT6 Yum Source Configuration

Source: Internet
Author: User
Tags gpg

First Contact Redhat system, install software, found no Ubuntu apt-get Package Manager, comes with Yum Package Manager and can not find anything, on-line search for a long time, finally put Yum configuration, thank Bo Owners ~

When using the Yum that comes with the redhat system, there is always an error to do, as Yum Redhat is charged and not registered for use. So we're going to uninstall the Yum that comes with redhat and switch to Yum, the free CentOS system.

1. Uninstall RedHat's own Yum

grep Yum Xargs rpm-e--nodeps

2. Download the relevant installation package

http://mirrors.163.com/centos/6/os/x86_64/Packages/

http://mirrors.163.com/centos/7/os/x86_64/Packages/

Can be found in these two pages to install the package, the folder and the package will be constantly updated, if the page does not exist, go to the root directory http://mirrors.163.com/centos/to find where there are available files.

The required documents are as follows: (note: The version of the file may be updated)

python-iniparse-0.3. 1-2.1. el6.noarch.rpmYum-metadata-parser-1.1. 2-el6.x86_64.rpmYum-3.2. el6.centos.noarch.rpmYum-plugin-fastestmirror-1.1 . el6.noarch.rpm

3. Install Yum

 rpm-ivh Python-iniparse-0.3 . 1 --ivh yum -metadata-parser- 1.1 . 2 --ivh yum -3.2 . 29 -yum -plugin-fastestmirror-1.1 . 30 -

Note that the last two packages must be installed in one piece, otherwise the installation will fail because of mutual dependence!

4. Configure NetEase Source

If/etc/yum.repos.d/rhel-debuginfo.repo this file exists, back it up:

CP /etc/yumrepos.d/rhel-debuginfo.repo/etc/yumrepos.d/rhel-debuginfo.repo.bak

Create and edit directly if not present

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

The contents are as follows:

[Base]name=centos-$releasever-Basebaseurl=http://mirrors.163.com/centos/6/os/$basearch/gpgcheck=1Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6#released Updates[updates]name=centos-$releasever-Updatesbaseurl=http://mirrors.163.com/centos/6/updates/$basearch/gpgcheck=1Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6#packages used/producedinchThe 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 could be useful[extras]name=centos-$releasever-Extrasbaseurl=http://mirrors.163.com/centos/6/extras/$basearch/gpgcheck=1Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6#additional packages that extend functionality of existing Packages[centosplus]name=centos-$releasever-Plusbaseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/gpgcheck=1enabled=0

By comparing the paths, we know that the information of the computer system (32 or 64 bits) and the search contents are stored in $basearch.

5. Clear the Cache

Yum Clean All

(You have to use Yum to always quote a section error >_<) because you did not clear the cache.

6 . Test to see if you can use

Yum Search PHP

At this time, if the error, it is likely that BaseURL can not find, according to the error message lock fault location, check whether the link exists. If there are only one or two addresses that cannot be linked (preferably not in [base] baseurl), they can be commented out directly, without affecting the search results.

7. Summary

I think the most difficult part of the Redhat Yum source configuration is that the URL of the source file is constantly changing and it is difficult to search. A few years ago the blog can only refer to its configuration steps, do not follow the URL of the link. Keep this in mind and there will be fewer questions to configure.

Resources:

Http://www.cnblogs.com/chuyuhuashi/p/4119993.html

http://blog.itpub.net/25313300/viewspace-708509/

REDHAT6 Yum Source Configuration

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.