Reprinted from http://www.cnblogs.com/jifeng/archive/2010/08/26/1809566.html | http://www.cnblogs.com/yisohoo/articles/1423940.html
In the past, it was very convenient to configure Yum with fedora, but it was not so convenient to come to rhle. If the following settings are not made, software installation using yum is often unavailable, the detailed configuration is as follows (found online)
First, the rhel5 system has been installed with Yum, because if you use an official website to update the yum, it will prompt registration and so on unless you have bought rhel5. Therefore, you only need to change the yum update address to an open-source one. The files with the specified Yum update address are in/etc/yum. Repos. d. First, change them to backup files, that is, Add. Bak. [Root @ killgoogle ~] # Mv/etc/yum. Repos. d/rhel-debuginfo.repo/etc/yum. Repos. d/rhel-debuginfo.repo.bak [root @ killgoogle ~] # Mv/etc/yum. Repos. d/rpmforge. Repo. rpmnew/etc/yum. Repos. d/rpmforge. Repo. rpmnew. Bak
Create a new configuration file: [root @ killgoogle ~] # Cd/etc/yum. Repos. d [root @ killgoogle ~] # Touch rhel-debuginfo.repo [root @ killgoogle ~] # Touch mirrors-rpmforge [root @ killgoogle ~] # Touch rpmforge. Repo
Write something to the new configuration file: [root @ killgoogle ~] # Vi rhel-debuginfo.repo [base] Name = CentOS-5-base # http://mirrorlist.centos.org list = /? Release = $ releasever5 & arch = $ basearch & repo = OS # baseurl = http://mirror.centos.org/centos/$releasever/ OS /$basearch/ baseurl = http://ftp.sjtu.edu.cn/centos/5/ OS /?basearch/ gpgcheck = 1 gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# Released updates [update] Name = CentOS-5-Updates # updated list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = updates baseurl = http://ftp.sjtu.edu.cn/centos/5/updates/?basearch/ gpgcheck = 1 gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# Packages used/produced in the build but not released [Addons] Name = CentOS-5-Addons # Sort list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = Addons
Baseurl = http://ftp.sjtu.edu.cn/centos/5/addons/?basearch/ gpgcheck = 1 gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# Additional packages that may be useful [extras] Name = CentOS-5-extras # Your list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = extras
Baseurl = http://ftp.sjtu.edu.cn/centos/5/extras/?basearch/ gpgcheck = 1 gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# Additional packages that extend functionality of existing packages [centosplus] Name = CentOS-5-plus # Sort list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = centosplus baseurl = http://ftp.sjtu.edu.cn/centos/5/centosplus/?basearch/ gpgcheck = 1 Enabled = 0 gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# Contrib-packages by centos users [contrib] Name = CentOS-5-contrib # partition list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = contrib baseurl = http://ftp.sjtu.edu.cn/centos/5/contrib/?basearch/ gpgcheck = 1 Enabled = 0 gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# Vi Dag. Repo [Dag] Name = Dag RPM repository for rhel5 baseurl = signed enabled = 1 gpgcheck = 1 gpgkey = http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt