[Recommended] install Yum on Redhat server 5.4 [Use Netease free Yum source to configure and update Yum]

Source: Internet
Author: User

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.

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.