The above error message is prompted when you use yum to install a software on the rhel machine of the company because your linux is not registered on the Red Hat Network, so you cannot download the software package, centOS can be used as an alternative. The following describes how to use centos. (For the relationship between rhel and centos, refer to this article:
The above error message is prompted when you use yum to install a software on the rhel machine of the company because your linux is not registered on the Red Hat Network, so you cannot download the software package, centOS can be used as an alternative. The following describes how to use centos. (For the relationship between rhel and centos, see this article: bytes)
1. Uninstall the default yum package installed by rhel
View yum package
Rpm-qa | grep yum
Detach
Rpm-qa | grep yum | xargs rpm-e -- nodeps
2. download the new yum package
Wget http://centos.ustc.edu.cn/centos/5/ OS /x86_64/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm
Wget http://centos.ustc.edu.cn/centos/5/ OS /x86_64/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
Wget http://centos.ustc.edu.cn/centos/5/ OS /x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
And install
Rpm-ivh yum -*
Note: yum and yum-fastestmirror are mutually dependent, so install them at the same time.
3. Download the configuration source of yum
Wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
4. modify the configuration Source
The url inside the CentOS-Base.repo into Netease yum source http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/ (what software package, you can clearly see), like our company, don't need to go abroad site, fast.
5. Update all
Copy modified CentOS-Base.repo to/etc/yum. repos. d/directory, and execute yum update in this directory for unified updates. After the update is complete, it is easier to install software or something. Otherwise, so you have to be busy... Linux software package dependency is quite a headache