Today, I had to maintain a Linux-installed machine, so I thought I could solve the problem based on my previous experience. However, I discovered that a bunch of software packages on the machine were not installed,
The worst thing is that even the package manager is not installed. I thought it was FreeBSD. I checked it and found it was RedHat Linux Server 5.4,
So I started to install yum. I searched on Google and found that there were not many similar cases, but this was not the first time I met RedHat without yum,
Because the last time someone asked for help, they could not solve the problem and did not pay attention to it. However, this maintenance was necessary, so I tried it for a long time,
This is probably one of my most uncomfortable experiences, and there are not many resources for Redhat, so the basic RPM package uses centos 5, so I am full of resentment towards RedHat.
1. First, determine the system architecture
After confirming it is x86_64, download the desired RPM package in Netease's mirrors :( if it is i386, you need to find the corresponding package in the http://mirrors.163.com/centos/5/ OS /i386/CentOS)
Wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/m2crypto-0.16-8.el5.x86_64.rpm
Wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm
Wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
Wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
Wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/python-urlgrabber-3.1.0-6.el5.noarch.rpm
Wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm
Wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
Wget http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
2. Install (upgrade) The software package and import the certificate.
# Rpm-uvh *
# Rpm-import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
3. Enable Yum to use Netease's source:
# Cd/etc/yum. Repos. d/
# Wget http://mirrors.163.com/.help/CentOS-Base-163.repo
4. Use
# Vi CentOS-Base-163.repo
Add # before all the uploadlists, replace all $ releasever with 5, and save
5. Clear and regenerate the yum Cache
# Yum clean metadata
# Yum makecache
6. Then Yum will work normally, and update it as soon as possible.
# Yum-y upgrade
From: http://blog.smdcn.net/article/1012.html
Note: The aboveArticleFrom others' blogs, I have fixed that RedHat 5.4 does not have Yum installed. In fact, yum has already been installed, but by default, the yum source uses resources on the RedHat official website, if you have not purchased any related services, installing the software using Yum will fail, prompting you to register the software first. The above operation is to use Netease's free Yum source to configure and update the yum source.