The CentOS configuration cost to the Yum

Source: Internet
Author: User

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

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.