1. Create a local yum source
-p mkdir / Media / cdrom (create recursive directory cdrom)
Mount / dev / SR0 / Media / cdrom (mount the CD, mount point of / Media / cdrom)
df -ht (Mount View)
cd / etc / yum. repos.d (switching paths to the source profile official yum)
mkdir backup (create a backup)
Music Videos C * backup (transfer all files beginning with the C to the backup)
echo -e "[haha] \ nname = haha \ = 0 ngpgcheck \ = nenabled. 1 \ nbaseurl = File: /// Media / CDROM "> local.repo
. (echo -e process (identification) of special characters, the module name haha, gpg check is 0, no verification start, base path is / media / cdrom information are imported local.repo)
yum makecache (creates cached)
2. restore the original state
Clean All yum (to clear the cache)
cd /etc/yum.repos.d (yum switched path to official sources in the configuration file)
RM -rf local.repo (delete local yum repository file)
mv Backup / *. (The backup file the contents of all transferred to the removal of the current path)
RM -rf backup (delete the backup files)
cd
umount / media / cdrom (uninstalled CD)
RM -rf / media / cdrom (delete / media / cdrom directory)