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]
CentOS-5-Base
# Items list = http://mirrorlist.centos.org /? Release = $ releasever5 & arch = $ basearch &
Repo = OS
# Baseurl = http://developer.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]
CentOS-5-Updates
# Items 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]
CentOS-5-Addons
# Items 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
# Items 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]
CentOS-5-plus
# Items 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
# Items 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 = http://ftp.riken.jp/linux/dag/redhat/el5/en/?basearch/dag/
Enabled = 1
Gpgcheck = 1
Gpgkey = http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt
Modify the second configuration file:
[Root @ killgoogle ~] VI mirrors-rpmforge
Http://apt.sw.be/redhat/el5/en/#arch/dag
Http://archive.cs.uu.nl/#/dag.wieers/redhat/el5/en/#arch/dag
Bytes
# Http://ftp.heanet.ie/pub/freshrpms/pub/dag/redhat/el5/en/#arch/dag
Http://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/?arch/dag
Http://developer.cpsc.ucalgary.ca/#/dag/redhat/el5/en/?arch/dag
Http://mirrors.ircam.fr/pub/dag/redhat/el5/en/#arch/dag
Http://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/#arch/dag
Http://rpmfind.net/linux/dag/redhat/el5/en/$arch/dag
Http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el5/en/#arch/dag
Http://www.mirrorservice.org/sites/apt.sw.be/redhat/el5/en/?arch/dag
Modify the third configuration file:
[Root @ killgoogle ~] # Vi rpmforge. Repo
# Name: rpmforge RPM repository for Red Hat Enterprise 5-Dag
# URL: http://rpmforge.net/
[Rpmforge]
Name = Red Hat Enterprise $ releasever-rpmforge.net-Dag
# Baseurl = http://apt.sw.be/redhat/el5/en/?basearch/dag
Using list = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
# Prepare list = file: // etc/yum. Repos. d/mirrors-rpmforge
Enabled = 1
Protect = 0
Gpgkey = file: // etc/pki/rpm-GPG-key-rpmforge-Dag
Gpgcheck = 1
There are two methods:
I have tried this and set up Yum on the server.
Reference: http://www.linuxdiyf.com/viewarticle.php? Id = 70630
Note:
VI/etc/yum. conf
In addition, timeout = 120
And 5.0 in the CentOS-Base.repo file can be modified to 5.2
If the following error message is displayed through the above Configuration:
Downloading packages:
Warning: rpmts_hdrfromfdno: Header V3 DSA Signature: nokey, key ID 6b8d79e6
GPG key retrieval failed: [errno 14] HTTP Error 404: not found
Solution 1:
Download and import key
CD/etc/pki/rpm-GPG
Wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
Rpm -- import/etc/pki/rpm-GPG/RPM-GPG-KEY *
The content in http://developer.centos.org/centos/rpm-gpg-key-centos-5is as follows:
Code
----- Begin PGP Public Key Block -----
Version: GnuPG v1.2.6 (GNU/Linux)
Mqgibewfb6mrbacrnyw6ykmt + mwjlcihoytxgf3maxmnaidey6hcyn8rivssvtjk
Cftqblboplv/ow2ytkrco2xhn46enfnmri8fgt8g + 9jf3muvi7kiv1he4ijynhxb
+ F2zqivhf3iauj1ys + p8tk64fdfxdqdrgqfisd/+ pksgx53/877 irvdw1_cguqcr
Ioip5th0fj0oluy4asyvzh8eai1_heqsy + 9zip + 2r3/fy1_lkkjwcmlrbug + cyo
Lydd6eqxe9mq8xkgfdj9zb/0 + jzk/xqestheefg75q3noq5ocpvfo4czukerirab
Qkbdbhatj3jhogm12xsuyn + ri6nemv2zogoqcc2twmdetfrpyp2moo53nufwhbay
Xjeta/sheeqt9huhzdi/lebnbj0l8nbgfln1nsp1gtvagbvkr4rz6dtqyl0uzoj
Ra3ywwlrl9iv9mrpb1fmn60l2jtmmcc7j6lacmpk906n + FCN/docj1m4s/4 cnanq
Nhzcfhaftql56snyltck1xzhssgz/g0gnnbu/aaj4woj0uef5lrgq2vude9tltug
S2v5ichdzw50t1mgnsbpzmzpy2lhbcbtawduaw5nietleskgpgnlbnrvcy01lwtl
Eubjzw50b3mub3jnpohkbbmragakbqjfnwekahsdbqkszamabgsjcacdagmvagmd
Fgibah4baheaaaojekikr9zoviixkleamwsozdvzo + wchcg3s/spnowckhmaajwi
E2axpzvrpsqninuqwwkdrtil5yhmbbmragambqjfnwisbymszairaaojedjcfhy5
Bytes
F7kbdqrfnwezeaqa/hnj5yiozwgtf6jt + kii8iua + wnjqbkomphoq8moxbwdv5ks
4e1dphzrqxhshjmub4suj93sgmsaf2ayc9t51msjv33kfzpf2giahcmqfabe/2hj
Amzcqzhrgjcex6ek8l8sfkou7viczyajrsik8gxwkbuqknp/9 lksoczv + xsaawud
/Idxpkk4vrrhscwc6i23fdi0ur52bzeqhiaiswnfo521yglk2w1xyclc2ayjc8ni
Nrmx1tcnex0/gk7icyjowh1vc7 // 79swftx2eato + q07xjfx4e66wxjlco9lojos
Vk5qc7r + xzldolgftbzatrqfzf6yr7qtu + bebwlopwntie8egbecaa8fakwfb7mc
Bytes/
9gxdnhgqeaweslqfhpa3yyxh
= O/MX
----- End PGP Public Key Block -----
Solution 2:
Download the configuration file that I have configured successfully and replace it in the execute the import key command http://cid-6adab3222e64b22c.office.live.com/self.aspx/.Public/linux/yum/yum%20%5E_config.zip Yum other: 3. Use the yum command to install and uninstall the RPM package # Yum install Dovecot // install Dovecot (Mail POP3 Protocol) package # Yum remove Dovecot // Delete Dovecot package # Yum clean all // clear Yum cache # Yum list // list all installable packages # Yum list updates // list all updatable packages software Package
Restart
Service Yum-updatesd restart