The default yum is installed on the network, it is very painful to install the software through Yum without a network or poor speed. In fact, for the CentOS DVD, the software provided is sufficient to meet our needs, and the software version of the DVD is stable version, download speed is fast, for learning CentOS, the CentOS DVD as the default Yum source can greatly improve the learning efficiency.
1. Create a mount directory for the DVD
mkdir /media/centos
2. Mount the CentOS DVD under Linux (virtual machine Mount DVD Not said, should be)
Mount -T Auto/dev/cdrom/media/centos
3, view the relevant configuration file, directory for
[[email protected] ~]# yum . Repos.d/-rw-r--r--. 1 root root 1926 July 3 10 : 15 centos-base.repo -rw-r--r--. 1 root root 637 July 3 10 : 15 centos-debuginfo.repo -rw-r--r--. 1 root root 626 July 3 10 : 15 Centos-media.repo
4. Disable Yum's network update mode, simply rename the default preferred Centos-base.repo to Centos-base.repo.bak
Yum MV Centos-base.repo Centos-base.repo.bak
5. Configure local Yum Source
[Email protected] ~]# vim/etc/yum. Repos.d/centos-media.repo
Will
[c6-media]name=centos-$releasever- mediabaseurl=file:///media/centos/ file:///media/cdrom/file://media/cdrecorder/ gpgcheck=1enabled=0
Revision changed to
[c6-media]name=centos-$releasever- mediabaseurl=file:///media/centos/ gpgcheck=1enabled=1
Where BaseURL changes to the mount directory of the DVD, enabled=1 turn on local update mode
: Wq Save Exit
6. Clear the original Yum information
Yum Clean allloaded plugins:fastestmirrorcleaning up everything
7. Check the DVD software list
Yum Yum listloaded plugins:fastestmirrordetermining fastest mirrorsc6-media 3.7 kB xx: xx ... c6-media/primary_db 3.3 MB xx:xx ...
This will be the default use of DVD installation software, if you want to restore the network installation mode, the Centos-base.repo.bak renamed to restore.
The CentOS configuration cost to the Yum