|
Usually when you install software or update CentOS, yum is the most simple and convenient way, and the system defaults to the source address yum update unstable, it is necessary to update the source address modification, general domestic use 163 faster.
yum update source configuration file: /etc/yum.repos.d/CentOS-Base.repo
1. Before you back up the file 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 editions)
vim open the configuration file:
vim /etc/yum.repos.d/CentOS-Base.repo
Copy and paste the following to the configuration file below:
# 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
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, you can select N) |
|
|
|