CentOS Configuration Local Yum Source--Find a Web tutorial

Source: Internet
Author: User
Tags gpg custom name

1. mount the disc

[Email protected] ~]# Mkdir/media/centos

[Email protected] ~]# Mount/dev/cdrom/media/centos

2. Enter the /etc/yum.repos.d directory
[Email protected] ~]# cd/etc/yum.repos.d/

[Email protected] yum.repos.d]# MV Centos-base.repo Centos-base.repo.bak

# will be Centos-base.repo change to a backup file so that you can bypass the network for local YUM source installation.

[email protected] yum.repos.d]# CP Centos-media.repo Centos-media.repo.bak

# Backup Centos-media.repo file, we'll edit the file later.

3. Edit the centos-media.repo configuration file

[Email protected] yum.repos.d]# VI Centos-media.repo

# Centos-media.repo

#

# This repo was used to mount the default locations for a CDROM/DVD on

# CentOS-5. 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=c5-media [command]

#

# or for the media repo, does this:

#

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

[C5-media]

name=centos-$releasever –media # Custom Name

baseurl=file:///media/centos/# Local CD-Mount Path

file:///media/cdrom/

file:///media/cdrecorder/

gpgcheck=0 # Check gpg-key,0 to not check , 1 to check

enabled=1 # enabled YUM Source , 0 to not enable , 1 to enable

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5

~

4. Execution After configuration is complete

[email protected] yum.repos.d]# Yum Clean All # Clear Yum Source Cache

[[email protected] yum.repos.d]# Yum Update # Update Yum Source

after the update is complete, you can use the local YUM Source to install the appropriate service.

This article is from the "One Meter Sunshine" blog, please be sure to keep this source http://sunshine3.blog.51cto.com/3988340/1616586

CentOS Configuration Local Yum Source--Find a Web tutorial

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.