CentOS Yum Source problem

Source: Internet
Author: User
Tags gpg yum repolist

When configuring Centos-6.0-x86_64-bin-dvd2.iso as the local Yum source, there are quite a few problems:

-----------------------------------------Question one------------------------------------------

Mount the Centos-6.0-x86_64-bin-dvd2.iso on the/mnt and configure the local Yum Source:

    1. #mount/root/centos-6.0-x86_64-bin-dvd2.iso/mnt-o Loop
    2. #vi/etc/yum.repos.d/software.repo
    3. [Software]
    4. Name=software
    5. Baseurl=file:///mnt
    6. EnablEd=1
    7. Gpgcheck=1
    8. gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6
    9. #yum repolist

Then the error is-_-!, the wrong information is almost:

File:///mnt/repodata/repomd.xml: [Errno] Could not open/read file:///mnt/repodata/repomd.xml. Mistake from BaseURL does not contain the Repodata directory

Why the problem occurred:

Centos-6.0-x86_64-bin-dvd2.iso This image does not contain Yum's package index database Repomd.xml, which is typically placed in the Repodata folder. Therefore, without special tools, the packages contained in this centos-6.0-x86_64-bin-dvd2.iso cannot be used as a local source of Yum alone.

-----------------------------------------question two------------------------------------------

In my CentOS-6, the/etc/yum.repos.d/directory itself already has 3 already built repo library, is base, Media, Debug.

I create a new Software.repo myself, using the Centos-6.0-x86_64-bin-dvd1.iso image, which contains the Repodata file.

But no matter how I adjust the settings, with the Yum repolist command , the packages contained in the ISO are not found, and the enableD value in all the. Repo is set to 1, but using Yum Repolist prompts the error:

Could not retrieve mirrorlisthttp://mirrorlist.centos.org/?release=6&arch=x86_64&repo=centosplus error was:Pycurl ERROR 6-"couldn ' t resolve Host ' mirrorlist.centos.org '"Error:cannot Retrieve repository metadata (Repomd.xml) for Repository:centosplus.verify its path and try again

Workaround: To use your own newly created Yum Local source, the. Repo Library provided by the system itself is temporarily set to Disabled (Enabled=0), in which case the Yum repolist can be used to properly search the local package library provided by ISO.

Attached: Steps to establish a local Yum Source:

1. Mount the ISO image with the package and the corresponding Repodata index in a directory (I put it under/mnt)

2, create your own configuration file under/etc/yum.repos.d/(for example, Software.repo), must use the. Repo end, the content is:

    1. [software]                      //software is the configuration name  
    2. name=SOFTWARE 
    3. baseurl=file:///mnt/            //because it is a local source, it is file://, which points to the parent directory of the Software library and Repodata  
    4. enabled=1                       //activating this configuration  
    5. gpgcheck=0                       //does not carry out GPG check  

3. Set the Enabled key value of other configuration files to 0 in the yum.repos.d/directory, otherwise it will interfere with the configuration file that you set up when executing sequentially.

CentOS Yum Source problem

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.