Local Yum source configuration

Source: Internet
Author: User

Yum library configuration: create a local repository

Configuration environment: centos 5.10

Purpose: automatically resolve the dependency of the RPM software package and provide the software download source for the client.

Implementation: create a local software warehouse

Modify configuration file

Clear Cache

Reload

Implementation:

[[Email protected] ~] # Mkdir/var/centosdvd // create a local repository directory

[[Email protected] ~] # Cd/MISC/CD // switch to the mount point

[[Email protected] ~] # Cp-RF */var/centosdvd // copy the CD File

[[Email protected] ~] # Ls-LD/var/centosdvd/* | grep ^ d // verify the copy result

Configure the yum client:

[[Email protected] ~] # Vim/etc/yum. Repos. d/centos. Repo // custom Yum configuration file. The name can be customized, but the extension must end with. repo.

[Centos-5.10] // custom name, unique

Name = Description of the centos Repository

Baseurl = file: // var/centosdvd // URL for Yum access

Or you can use the mount point method:

Baseurl = file: // MISC/CD/centos/

Enabled = 1 // This repository is enabled

Gpgcheck = 0 // verify the RPM package with installation

Gpgkey = file: // etc/pki/rpm-GPG-key-RedHat-release // The key file used for verification

Check whether Yum is available

650) This. width = 650; "Title =" qq20140728232322.png "src =" http://s3.51cto.com/wyfs02/M02/41/E8/wKioL1PWaR-x97g8AAClXCNTEjA433.jpg "alt =" wKioL1PWaR-x97g8AAClXCNTEjA433.jpg "/>

[[Email protected] ~] # Yumclean all // clear the repository Cache

[[Email protected] ~] # Yumlist // reload


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.