Configuration and usage of local Yum source and network Yum source in centos 6.5

Source: Internet
Author: User
Tags gpg

1. Local Yum Source

1. The system has installed the yum software package by default, so you can directly configure it:

[[Email protected] ~] # Cd/etc/yum. Repos. d/Yum source configuration file directory


[[Email protected] yum. Repos. d] # mv CentOS-Base.repo CentOS-Base.repo.bak first rename the network Yum source configuration file (invalidate it)

[[Email protected] yum. Repos. d] # Vim CentOS-Media.repo editing local Yum source files

C6-media

Name = centos-$ releasever-media local Yum source name (can be modified at Will)

Baseurl = file: // MNT/sr0 disk Mount directory/mnt/sr0

Gpgcheck = 1

Enabled = 1 use this yum source (0 is not enabled)

Gpgkey = file: // MNT/sr0/RPM-GPG-KEY-CentOS-6 local Yum source key


Ii. Network Yum source (the premise is that you must be connected to the Internet. The yum source used here is the address of the University of Science and Technology of China:

University of Science and Technology: http://centos.ustc.edu.cn/centos)

[[Email protected] yum. Repos. d] # This step is not required if the MV CentOS-Base.bak CentOS-Base.repo is not renamed before

[[Email protected] yum. Repos. d] # Vim CentOS-Base.repo edit network Yum source file

[Base]

Name = centos-$ releasever-Base

# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = OS

Baseurl = http://centos.ustc.edu.cn/centos/?releasever/ OS /?basearch/

Gpgcheck = 1

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


# Released updates

[Updates]

Name = centos-$ releasever-Updates

# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = updates

Baseurl = http://centos.ustc.edu.cn/centos/?releasever/updates/?basearch/

Gpgcheck = 1

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


# Additional packages that may be useful

[Extras]

Name = centos-$ releasever-extras

# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = extras

Baseurl = http://centos.ustc.edu.cn/centos/?releasever/extras/?basearch/

Gpgcheck = 1

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


# Additional packages that extend functionality of existing packages

[Centosplus]

Name = centos-$ releasever-plus

# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = centosplus

Baseurl = http://centos.ustc.edu.cn/centos/?releasever/centosplus/?basearch/

Gpgcheck = 1

Enabled = 0

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

# Contrib-packages by centos users

[Contrib]

Name = centos-$ releasever-contrib

# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = contrib

Baseurl = http://centos.ustc.edu.cn/centos/?releasever/contrib/?basearch/

Gpgcheck = 1

Enabled = 0

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


Iii. Notes:

It is recommended that only one Yum source be valid when yum is used, because the network Yum source is used by default.





This article is from the "Resource Sharing" blog, please be sure to keep this source http://www1991.blog.51cto.com/8692352/1563304

Configuration and usage of local Yum source and network Yum source in centos 6.5

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.