Fedora7 configuration use yum to use the isoDVD image source to install software

Source: Internet
Author: User
Fedora7 configuration use yum to use the isoDVD image source to install software

1. first, attach the CD

# The monut/dev/cdrom/mnt/cdrom disc will be mounted to/mnt/cdrom. now let's check whether the disc is mounted successfully (if this directory is not available, create it first)

# If ls/mnt/cdrom has content, the mounting is successful.

2. Understanding the truth

CentOS has two yum sources, which have two files under/etc/yum. repos. d/: CentOS-Base.repo and CentOS-Media.repo. But these two sources are not used at the same time, the default use of the Internet upgrade CentOS-Base.repo source (this file is the URL, you can look at it ), unless we manually modify the system to use the Media source, and the Media source is the local source of the computer, it contains the local CD that we just mounted.

3. start operation

First, rename the CentOS-Base.repo file so that the system can not find the file, so that you cannot use the internet update method:

# Mv CentOS-Base.repo CentOS-Base.repo.bak

Then, vi CentOS-Media.repo

Delete the last two rows of the following three rows
Baseurl = file: // media/CentOS/
File: // media/cdrom/
File: // media/cdrecorder/

The first line is changed to the path of the attached disk, as follows:

Baseurl = file: // mnt/cdrom/

Then, find this attribute and change the value to 1, so that the enable switch of the local source file is enabled.
Enabled = 0

Changed to enabled = 1

Save it.

Then, you can use yum check-update or yum install * to test whether the source is successful and effective.

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

Here is a relatively lazy method.

Go to the/etc/yum. repo. d/folder.

Vi Centos-Media.repo

Change the file location in the file to/media/dvd, and open the local source, as shown below:

C5-media
Name = CentOS-$ releasever-Media
Baseurl = file: // media/dvd/
Gpgcheck = 0
Enabled = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
~

You can use the local dvd as The yum source after saving and releasing it. of course, remember to put the CD in.

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.