Modify etcyumreposdCentos-BaserepoCentOS-BaserepoThemirrorsys
Modify/etc/yum. repos. d/Centos-Base.repo
# CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client. You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead.##[base]name=CentOS-$releasever - Base - 163.combaseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates [updates]name=CentOS-$releasever - Updates - 163.combaseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updatesgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be useful[extras]name=CentOS-$releasever - Extras - 163.combaseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extrasgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plus - 163.combaseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplusgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-$releasever - Contrib - 163.combaseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
File free: http://download.csdn.net/detail/chenyiming_1990/7032825
Configuration and compilation of the. repo source in centos/etc/yum. repo. d/
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and
# Update status of each mirror to pick mirrors that are updated to and
# Geographically close to the client. You shoshould use this for CentOS updates
# Unless you are manually picking other mirrors.
#
# If the specified list = does not work for you, as a fall back you can try
# Remarked out baseurl = line instead.
#
#
[Base] // unique identifier
Name = CentOS-$ releasever-Base // name of the. repo file used
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = OS
# The mirrorlist is automatically captured by the yum program, while the baseurl is a fixed one ?? Container URL
# Baseurl = http://developer.centos.org/centos/?releasever/ OS /?basearch/
# The url supports three protocols: http: // ftp: // file. After baseurl, it can be followed by multiple URLs. you can change it to an image site with a high speed, but only one baseurl
Gpgcheck = 1 # gpg signature check
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# The location of the gpg key. you must specify that the local key file can only be verified with the key on the server.
# Released updates
# This Section points to the software package required for software upgrade.
[Updates]
Name = CentOS-$ releasever-Updates
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = updates
// This path corresponds to the update folder on the server, that is, the software package is automatically found in the updates folder on the server.
# Baseurl = http://developer.centos.org/centos/?releasever/updates/?basearch/
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# Packages used/produced in the build but not released
# The path pointed to in this section is the software that has been used or created, but it has not been released.
[Addons]
Name = CentOS-$ releasever-Addons
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = addons
# Baseurl = http://developer.centos.org/centos/?releasever/addons/?basearch/
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# Additional packages that may be useful
# The path pointed to in this section may be useful for other software.
[Extras]
Name = CentOS-$ releasever-Extras
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = extras
# Baseurl = http://developer.centos.org/centos/?releasever/extras/?basearch/
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# Additional packages that extend functionality of existing packages
# This Section points to existing software extension software and plug-ins.
[Centosplus]
Name = CentOS-$ releasever-Plus
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = centosplus
# Baseurl = http://developer.centos.org/centos/?releasever/centosplus/?basearch/
Gpgcheck = 1
Enabled = 0 # enabled = 0 indicates that the source is disabled. if enabled is not written, enabled = 1.
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# Contrib-packages by Centos Users
# The path pointed to in this section is the software contributed by the system user.
[Contrib]
Name = CentOS-$ releasever-Contrib
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = contrib
# Baseurl = http://developer.centos.org/centos/?releasever/contrib/?basearch/
Gpgcheck = 1
Enabled = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5