Configure local Yum source in centos

Source: Internet
Author: User
Tags custom name
Centos local Yum source configuration-CentOS-6.4 as an Example

1. Place the image CD in centos or find the image file and mount it to the system.

Mount/dev/CDROM/mnt/CDROM #/mnt/CDROM directory must be created first

 

2. CD/etc/yum. Repos. d/# enter the/etc/yum. Repos. d/directory.

 

3. mkdir Bak

And move the CentOS-Base.repo and CentOS-Debuginfo.repo to the Bak directory so that local Yum source installation can bypass the network

 

4. Edit the CentOS-Media.repo configuration file

# CentOS-Media.repo # this repo can be used with Mounted DVD media, verify the mount point for # CentOS-6. you can use this repo and Yum to install items directly off the # dvd iso that we release. # To use this repo, put in your DVD and use it with the other repos too: # Yum -- enablerepo = c6-media [command] # Or for only the media Repo, do this: # Yum -- disablerepo = \ * -- enablerepo = c6-media [command] [c6-media] Name = centos-$ releasever-media # custom name baseurl = file: /// MNT/CDROM # Local CD Mount path gpgcheck = 0 # Check GPG-KEY, 0 is not checked, 1 is checked enabled = 1 # enable Yum source, 0 is not enabled, 1 is enabled


4. Run the command after the configuration is complete.

Yum clean all # Clear Yum source Cache

Yum update # update Yum Source

After the update, you can use the local Yum source to install the corresponding service.

 

5. test:

Yum install gcc-C ++ # Check whether the command is successful

 

 

Configure local Yum source in centos

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.