把下面四个文件放到/etc/yum.repos.d目录下
dag.repo:
[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://mirrors.ustc.edu.cn/centos/5/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://mirrors.ustc.edu.cn/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5
mirrors-rpmforge:
http://apt.sw.be/redhat/el5/en/$ARCH/dag
http://archive.cs.uu.nl/mirror/dag.wieers/redhat/el5/en/$ARCH/dag
http://ftp2.lcpe.uni-sofia.bg/freshrpms/pub/dag/redhat/el5/en/$ARCH/dag
#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://mirror.cpsc.ucalgary.ca/mirror/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
rhel-debuginfo.repo:
[base]
name=CentOS-5 - Base
#mirrorlist=http://mirrorlist.centos.org/?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
#mirrorlist=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
#mirrorlist=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
#mirrorlist=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
#mirrorlist=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
#mirrorlist=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
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
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
设置了DNS不生效,悲剧
如果你的服务器需要DNS,请在/etc/hosts中增加以下设置,有更好的方法请告知我。
202.141.160.110 centos.ustc.edu.cn
202.141.160.110 mirrors.ustc.edu.cn
202.38.97.230 ftp.sjtu.edu.cn
193.1.193.67 apt.sw.be
129.143.116.10 mirror1.hs-esslingen.de
78.41.71.17 be.mirror.eurid.eu
136.159.12.11 mirror.cpsc.ucalgary.ca
147.251.48.205 ftp.fi.muni.cz
123.129.254.17 repository.vsb.cz
147.229.176.19 merlin.fit.vutbr.cz
195.220.108.108 fr2.rpmfind.net
5.83.232.126 mir01.syntis.net
160.45.254.24 mirror.atrpms.net
37.58.58.140 mirror.de.leaseweb.net
193.1.193.64 ftp.heanet.ie
134.226.112.13 thammuz.tchpc.tcd.ie
122.213.199.121 mirror.fairway.ne.jp
134.160.38.1 ftp.riken.jp
203.217.178.196 mirror.oscc.org.my
94.75.223.121 mirror.nl.leaseweb.net
131.211.32.146 archive.cs.uu.nl
83.166.201.99 ftp.lug.ro
91.190.113.114 mirror.awanti.com
196.4.160.12 ftp.is.co.za
212.219.56.184 www.mirrorservice.org
72.88.94.11 repoforge.spinellicreations.com
207.223.121.100 mirror.teklinks.com
134.173.34.196 mirror.hmc.edu
129.21.171.72 mirror.rit.edu
130.117.72.247 nl.mirror.eurid.eu
108.59.10.97 mirror.us.leaseweb.net
118.69.250.132 mirror-fpt-telecom.fpt.net