If you do not have a CD, you need to install the software package using the yum source of the common network.
In RedHat linux, yum software is installed by default. However, due to authentication activation, redhat cannot directly install some yum software. If we need to install the software directly under redhat, we only need to change the yum source to CentOS, and then change all the variables in the source to the actual values, so that we can directly install the required software using yum.
Instructions for use
1. Download The http://mirrors.163.com file to the centos help document for the CentOS6-Base-163.repo and store it in/etc/yum. repo. d.
Centos 5 wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
Centos 6 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
The procedure is as follows:
2. First back up/etc/yum. repos. d/CentOS-Base.repo
3. Edit the CentOS6-Base-163.repo file and change $ releasever to the centos version. If it is RedHat 6.2 X86_64, for example, "baseurl = listen 6.2 32-bit as an example!
[Base]
Name = CentOS-6.2-Base-163.com
Baseurl = http://mirrors.163.com/centos/6.2/ OS /?basearch/
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = OS
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6.2
# Released updates
[Updates]
Name = CentOS-6.2-Updates-163.com
Baseurl = http://mirrors.163.com/centos/6.2/updates/?basearch/
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = updates
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6.2
# Additional packages that may be useful
[Extras]
CentOS-6.2-Extras-163.com
Baseurl = http://mirrors.163.com/centos/6.2/extras/?basearch/
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = extras
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6.2
# Additional packages that extend functionality of existing packages
[Centosplus]
CentOS-6. 2-Plus-163.com
Baseurl = http://mirrors.163.com/centos/6.2/centosplus/?basearch/
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = centosplus
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6.2
# Contrib-packages by Centos Users
[Contrib]
CentOS-6.2-Contrib-163.com
Baseurl = http://mirrors.163.com/centos/6.2/contrib/?basearch/
# Items list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = contrib
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6.2
After editing, save and run:
Yum clean all clear original Cache
Yum makecache get yum list
Set Yum source in RedHat
Build an intranet yum Server
Build a local network CentOS Yum Server