Enter the Yum source configuration directory First
Cd / etc / yum.repos.d
163 of Yum Sources:
wget Http://mirrors.163.com/.help/CentOS5-Base-163.repo
Download to local replace "$ releasever" with "5"
RedHat5.6 using the CentOS Yum Source Update method
-------------------------------------------------- ---------------------------
Since Redhat's Yum online update is chargeable, our redhat is not registered and cannot be updated online to download RPM packages. After uninstalling the Redhat yum, restart the Yum installation of CentOS and configure the other Yum sources.
1 confirm the version of Redhat
Cat / etc / redhat-release
Uname-m
2, delete redhat original yum source
Rpm-aq | grep Yum | xargs rpm-e--nodeps
3 Download the Yum installation package for CentOS (163 source)
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
Also rely on python-iniparse-0.2.3-4.el5.noarch.rpm, but my system has been installed, is the system default Python2.4 comes with. If your system is not installed, please install it.
4. Installing the Yum Package
RPM-IVH yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
RPM-IVH yum-3.2.22-40.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
Note: The last two packages are to be installed together at the same time, otherwise you will be prompted to rely on each other and the installation fails.
5. Change the Yum source #We use NetEase's CentOS image source
cd / etc / yum.repos.d /
Download Centos5-base-163.repo to local and replace "$ releasever" with "5"
6 Cleaning up
Yum Clean All
At this point, Redhat6 can use CentOS's yum source to install software online!
7. installation of software
Yum Install software name
Red Hat 5.6 configuration cent OS Yum source