CentOS Configuration local Yum source

Source: Internet
Author: User
Tags gpg install perl

Since the installation of CentOS without a graphical interface is minimized on VMware virtual machines, installing the VMware Tools times error prompts you to install Perl with the option to configure a local Yum source for installation with the CentOS installation CD in the absence of a network connection.


1. Load the installation CD ISO file into the CD drive and mount the optical drive to the system files directory:

Mkdir-p/mnt/cdrom #创建挂载目录mount/dev/cdrom/mnt/cdrom #挂载光盘


2. Modify the Yum source configuration file:

ls -l /etc/yum.repos.d/   #进入yum源配置文件目录mv   centos-base.repo centos-base.repose_bak  #重命名或删除CentOS-base.repo File mv centos-debuginfo.repo  centos-debuginfo.repo_bak  #重命名或删除CentOS-debuginfo.repo File vi centos-media.repo # Edit the file Centos-media.repo, which is roughly the following 
# 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     #名称描述baseurl =file:///mnt/ cdrom/             #yum源目录, source address gpgcheck=1  &nbsp ;    #检查GPG-key,0 for no check, 1 for check enabled=1   #是否用该yum源, 0 for Disable, 1 for use gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-c EntOS-6 #gpgcheck = 0 o'clock no configuration required


3. Test if Yum is configured successfully

Yum List


4. Clear Yum Cache

Yum Clean All


Of course, the above method can also copy the contents of the disc to the local file system, and then specify the directory as the source address.

CentOS Configuration local Yum source

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.