CentOS Configuration local Yum source

Source: Internet
Author: User
Tags gpg

CentOS Configuration local Yum source

1, the system image installed in the optical drive

2. Mount Image

First step: Cd/media

Step two: mkdir cdrom under the Meida directory

Step Three: Mount/dev/cdrom/media/cdrom

3, CD/ETC/YUM.REPOS.D

The following 4 files are available in this directory

Centos-debuginfo.repo

Centos-fasttrack.repo

Centos-media.repo //local source configuration file

Centos-base.repo //Network source configuration file

Centos-vault.repo


The contents of the Centos-media.repo file are as follows:

# Centos-media.repo

#

# This repo can is 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 on your DVD and use it with the other repos too:

# yum--enablerepo=c6-media [command]

#

# or for only themedia repo, does this:

#

# yum--disablerepo=\*--enablerepo=c6-media[command]

[C6-media] //is used to differentiate between different repository and must have a unique name

name=centos-$releasever –media //Description of repository, support for variables like $releasever $basearch

BaseURL is the most important part of the server settings, only the correct settings to obtain the software from above, the URL supports the protocol has http:/ftp://file://three kinds. After BaseURL can be followed by multiple URLs, you can change to a faster mirror station yourself, but BaseURL can only have one

baseurl= file:///media/CentOS/

file:///media/cdrom/ //local CD mount point, configure local Yum source,

file:///media/cdrecorder/

Gpgcheck=1

Enabled=0 //enabled is set to 1 o'clock to enable the local Yum source

gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


4, to configure the local Yum source, you need to disable the network source configuration file, the Yum The network source configuration file is renamed to Centos-base.repo.bak, otherwise the appropriate package is first found in the network source and read directly from the local source after renaming, while modifying the local mount point in the BaseURL in Centos-media.repo and setting the enabled parameter to 1



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.