This article integrates http: guotiegang55blog51ctocom9299371168745 and http: blogsinaco mcnsblog_73b89cd301013r8lhtml. I have tried it successfully. you can try it! I would like to thank the two bloggers for their articles. 1. configure the local yum
1. attach a CD
Mount/dev/cdrom/mnt/media
2. create a configuration file for the local yun source
Vi/etc/yum. repos. d/local. repo
Add the following information:
[Local]
Name = Local
Baseurl = file: // mnt/media
Enable = 1
Gpgcheck = 0
2. configure a third-party yum1. delete the original yum of redhat.
Rpm-aq | grep yum | xargs rpm-e -- nodeps
2. Download The yum installation file
Http://mirrors.163.com/centos/6.4/ OS /x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm Wget-c
Http://mirrors.163.com/centos/6.4/ OS /x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm wget-c
Http://mirrors.163.com/centos/6.4/ OS /x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm wget-c
Http://mirrors.163.com/centos/6.4/ OS /x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm wget-c
3. install the yum software package
(1) rpm-ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
(2) rpm-ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
(3) Do not mess up the installation sequence of the two instances (the middle 50% is normal)
Rpm-ivh yum-3.2.29-40.el6.centos.noarch.rpmyum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
4. change yum source # Use the CentOS image source of NetEase
(1) clear the yum warehouse
# Cd/etc/yum. repos. d/
# Rm-rf *
(2) set the source
# Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
# Vi CentOS6-Base-163.repo
Edit the file and replace all $ releasever in the file with your version number, that is, 6.4 is saved! Or directly copy the following memory to the CentOS6-Base-163.repo File (modified)
######################################## #########################
# CentOS-Base.repo
#
# The following system uses the connecting IP address of the client and
# Update status ofeach mirror to pick mirrors that are updated to and
# Geographicallyclose to the client. You shoshould use thisfor CentOS updates
# Unless you aremanually picking other mirrors.
#
# If the specified list = does not work for you, as a fall back you can try
# Remarked outbaseurl = line instead.
#
#
[Base]
Name = CentOS-6.4-Base-163.com
Baseurl = http://mirrors.163.com/centos/6.4/ OS /?basearch/
# Items list = http://mirrorlist.centos.org /? Release = 6.4 & arch = $ basearch & repo = OS
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
# Released updates
[Updates]
Name = CentOS-6.4-Updates-163.com
Baseurl = http://mirrors.163.com/centos/6.4/updates/?basearch/
# Items list = http://mirrorlist.centos.org /? Release = 6.4 & arch = $ basearch & repo = updates
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
# Additionalpackages that may be useful
[Extras]
CentOS-6.4-Extras-163.com
Baseurl = http://mirrors.163.com/centos/6.4/extras/?basearch/
# Items list = http://mirrorlist.centos.org /? Release = 6.4 & arch = $ basearch & repo = extras
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
# Additionalpackages that extend functionality of existing packages
[Centosplus]
CentOS-6.4-Plus-163.com
Baseurl = http://mirrors.163.com/centos/6.4/centosplus/?basearch/
# Items list = http://mirrorlist.centos.org /? Release = 6.4 & arch = $ basearch & repo = centosplus
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
# Contrib-packages by Centos Users
[Contrib]
CentOS-6.4-Contrib-163.com
Baseurl = http://mirrors.163.com/centos/6.4/contrib/?basearch/
# Items list = http://mirrorlist.centos.org /? Release = 6.4 & arch = $ basearch & repo = contrib
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
######################################## #############################
5. clear yum cache
# Yum clean all
# Yum makecache # cache the software package information on the server to a local machine to speed up searching and installing software
# Yum installvim * # test whether the domain name is available
Now, Redhat6 can use CentOS yum source to install software online!
6. use # yum update
Or # yum upgrade system
Note: two commands are different:
# Yum update
Upgrade all packages, change software and system settings, and upgrade the system version and kernel.
# Yum-y upgrade
Upgrade all packages without changing the software and system settings. upgrade the system version without changing the kernel.