Centos 6.0 Setting the disc as a Yum source

Source: Internet
Author: User

When using CentOS, it is convenient to install packages with Yum, but Yum is not useful if you can't connect to the Internet.  
One way to do this is to use the CentOS installation CD as a Yum source and then install the package using Yum. (The following steps are tested on the Centos6.0 system)  

Step 1, first mount the disc to the/media/cdrom directory of the system  

Mkdir/media/cdrom //CDROM directory under/media, default is no  
mount/dev/cdrom/media/cdrom //mount the optical drive to the/media/cdrom directory  

Step 2, enter into the/ETC/YUM.REPOS.D directory, and perform the following actions  

cd/etc/ YUM.REPOS.D  
mv Centos-base.repo Centos-base.repo.bak //rename Centos-base.repo  
vi CENTOS-MEDIA.REPO&NBSP
Modify the Gpgcheck parameter to gpgcheck=0 &NBSP
Modify the enabled parameter in it, and change it to enabled=1  

and then save exit. You can now install the package using the Yum-y Install command.

Centos 6.0 Sets the disc as the Yum Source setting method

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.