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