CentOS modify yum update source
When CentOS software is installed or updated, the yum method is the easiest and most convenient. By default, the yum update source address is unstable. Therefore, you need to modify the update source address, generally, 163 is faster in China.
Yum update source profile:/etc/yum. repos. d/CentOS-Base.repo
1. Back up the file before modification
Cp/etc/yum. repos. d/CentOS-Base.repo/etc/yum. repos. d/CentOS-Base.repo.bak
2. Modify the update source configuration file (CentOS6 address, similar to other versions)
Vim open the configuration file:
Vim/etc/yum. repos. d/CentOS-Base.repo
Copy and paste the following content to the configuration file:
# 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]
Name = CentOS-$ releasever-Base
Baseurl = http://mirrors.oschina.com/centos/?releasever/ OS /?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[Updates]
Name = CentOS-$ releasever-Updates
Baseurl = http://mirrors.oschina.com/centos/?releasever/updates/?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[Addons]
Name = CentOS-$ releasever-Addons
Baseurl = http://mirrors.oschina.com/centos/?releasever/addons/?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[Extras]
Name = CentOS-$ releasever-Extras
Baseurl = http://mirrors.oschina.com/centos/?releasever/extras/?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[Centosplus]
Name = CentOS-$ releasever-Plus
Baseurl = http://mirrors.oschina.com/centos/?releasever/centosplus/?basearch/
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
Finally, save the configuration file.
3. Update yum source configuration
Yum update
(If you do not want to update the software, select N)
RedHat 6.2 modify yum source in Linux use CentOS source for free
Configure the epel yum Source
Redhat local yum source configuration
Description of yum configuration file
Install yum in RedHat 6.1)
YUM installation and cleaning
Build yum local source on CentOS 6.4
This article permanently updates the link address: