Redhat Linux Enterprise Edition is released free of charge, but technical support and updates require service fees. If our RHEL is not registered with RHN, we cannot download the update package through yum.
CentOS is a Linux release that uses the source code re-compiled by RHEL. In most cases, the CentOS software package is exactly the same as RHEL, therefore, we can safely direct yum to the CentOS source to download and update software packages.
In CentOS images in China, 163 is a fast download speed for common Internet users. Therefore, 163 of CentOS is used as the update source.
Download the CentOS update source provided in 163
Go to the yum source configuration directory (/etc/yum. repos. d) and run the following command to download and update the source file.
Wget http://mirrors.163.com/.help/CentOS-Base-163.repo
Corrected source file errors
This update source file is prepared for CentOS. It is not exactly the same as RHEL. You must change the version in the file to 5.
Vi CentOS-Base-163.repo, then replace all $ releasever with 5 with the command ": 1, $ s/$ releasever/5/g"
KEY for importing CentOS
Run the following command:
Rpm -- import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
After a few simple steps, yum can work properly.
[Root @ localhost yum. repos. d] # yum search mysql
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Addons | 951 B 00: 00
Addons/primary | 202 B: 00
Base | 1.1 kB
Base/primary | 961 kB: 00
Base 2705/2705
Extras | 2.1 kB: 00
Extras/primary_db | 171 kB: 00
Updates | 1.9 kB: 00
Updates/primary_db | 357 kB: 00
Excluding Packages in global exclude list
Finished
==================================== Matched: mysql ====================================
.
.
.
Noodies Column