Since rhel does not have a registration code, it has been used as an update source for the past, but rhel cannot be updated from the official website. What should I do? Use CentOS as the update source: first put the rhel built-in file backup: [root@testyum.repos.d] # cprhel-debuginfo.reporhel-debuginfo.repo.bak [root@testyum.repos.d] # mvrhel-debuginfo.r
Since rhel does not have a registration code, it has been used as an update source for the past, but rhel cannot be updated from the official website. What should I do? Use CentOS as the update source:
First, back up the file that comes with rhel:
[Root @ test yum. repos. d] # cp rhel-debuginfo.repo rhel-debuginfo.repo.bak
[Root @ test yum. repos. d] # Music rhel-debuginfo.repo CentOS-Base.repo
[Root @ test yum. repos. d] # vi CentOS-Base.repo
[Base]
Name = CentOS-5-Base
Repo = OS
Baseurl = http://centos.ustc.edu.cn/centos/5/ OS /?basearch/
Gpgcheck = 0
Gpgkey = http://centos.ustuc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[Updates]
Name = CentOS-5-Updates
Baseurl = http://centos.ustc.edu.cn/centos/5/updates/?basearch/
Gpgcheck = 0
Gpgkey = http://centos.ustuc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[Addons]
Name = CentOS-5-Addons
Baseurl = http://centos.ustc.edu.cn/centos/5/addons/?basearch/
Gpgcheck = 0
Gpgkey = http://centos.ustuc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[Extras]
Name = CentOS-5-Extras
Baseurl = http://centos.ustc.edu.cn/centos/5/extras/?basearch/
Gpgcheck = 0
Gpgkey = http://centos.ustuc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[Centosplus]
Name = CentOS-5-Plus
Baseurl = http://centos.ustc.edu.cn/centos/5/centosplus/?basearch/
Gpgcheck = 0
Gpgkey = http://centos.ustuc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[Contrib]
Name = CentOS-5-Contrib
Baseurl = http://centos.ustc.edu.cn/centos/5/contrib/?basearch/
Gpgcheck = 0
Gpgkey = http://centos.ustuc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
[Root @ test yum. repos. d] # rpm -- import/etc/pki/rpm-gpg/RPM *
Connect the virtual machine to the Internet and test it.
[Root @ test yum. repos. d] # yum list
[Root @ test yum. repos. d] # yum install mysql
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, filter-data, keys, kmod, list-data, protect-packages, protectbase, rhnplugin, security, tmprepo,
: Verify, versionlock
This system is not registered with RHN.
RHN support will be disabled.
Loading mirror speeds from cached hostfile
Addons | 1.9 kB: 00
Base | 1.1 kB
Centosplus | 1.9 kB: 00
Contrib | 1.9 kB: 00
Extras | 2.1 kB: 00
Updates | 1.9 kB: 00
Skipping filters plugin, no data
0 packages excluded due to repository protections
Reading version lock configuration
Setting up Install Process
Resolving Dependencies
Skipping filters plugin, no data
--> Running transaction check
---> Package mysql. i386. 0.95-1. el5_7.1 set to be updated
--> Processing Dependency: perl (DBI) for package: mysql
--> Running transaction check
---> Package perl-DBI.i386. 52-2.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
========================================================== ========================================================== ========================================================== ========================================================== ==========
Package Arch Version Repository Size
========================================================== ========================================================== ========================================================== ========================================================== ==========
Installing:
Mysql i386 5.0.95-1. el5_7.1 updateles 4.9 M
Installing for dependencies:
Perl-DBI i386 1.52-2. el5 base 600 k
Transaction Summary
========================================================== ========================================================== ========================================================== ========================================================== ==========
Install 2 Package (s)
Upgrade 0 Package (s)
Total size: 5.5 M
Is this OK [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-DBI 1/2
Installing: mysql 2/2
Installed:
Mysql. i386. 0.95-1. el5_7.1
Dependency Installed:
Perl-DBI.i386 0: 1. 52-2.el5
Complete!
OK. The operation is successful ~~~~
If you want to use another update source, you can replace the updated URL in the baseurl in the configuration file with another one, such
Mirrors.163.com but pay attention to the path and version number ~
The better CentOS update sources in China are 163, sina, and HKUST. If there are any errors, check the error log and uninstall the yum software that comes with rhel to install CentOS.