linux-How to use the Linux installation CD to do yum local source

Source: Internet
Author: User
Tags yum repolist

Yesterday, I downloaded a installation of the CentOS 7 DVD disc. After installing the system, it is found that there are some software to install.

Some repo configuration files have been configured on the installed CentOS system. If you want to use the software libraries defined on these files, you must have Internet access to download and install the URLs on these repo.

Can I use a local CD as a Yum source and install the software from the CD?

The answer is yes. Write yourself a repo file to point to the disc.


2 Steps to complete:

1. Mount the disc.

----------------------------------------

Mkdir/mnt/dvd

Mount/dev/cdrom/mnt/dvd

Cd/mnt/dvd

Ls-l

# Enter the/mnt/dvd/directory to see if you can view the files in the disc

----------------------------------------


2. Write a repo file.

Repo file, a few simple commands can be.

----------------------------------------

Cd/etc/yum.repos.d

Vim Local_dvd.repo

# new repo, ending with. Repo



# Local_dvd.repo file contents are as follows:

[Local_dvd]

Name=centos-local_dvd

#只是描述文件, write any.

Baseurl=file:///mnt/dvd

Gpgcheck=0

Enabled=1

# Repo file end, save exit.


Yum Clean All

Yum Repolist

# clear the cache and reload the repo file

# So now local DVD can be a source of installation

----------------------------------------


Add:

1. In CentOS, there is a file Centos-media.repo, the configuration is the instance, modified to their own directory.

2. The same approach is true on virtual machines. Just add the ISO image you downloaded to the device CD on VMware. One more action for VMware to place an ISO image.


linux-How to use the Linux installation CD to do yum local source

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.