首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

CentOS6.0 国外机器怎么安装更新源

2012-09-07 
CentOS6.0 国外机器如何安装更新源国外机器有的不能直接访问到163的源,搞了很久才搞定,下面贴出具体方法:1

CentOS6.0 国外机器如何安装更新源

国外机器有的不能直接访问到163的源,搞了很久才搞定,下面贴出具体方法:

1.进入/etc/yum.repos.d,新建文件mirrors-rpmforge,然后写入以下地址:

?

http://apt.sw.be/redhat/el5/en/$ARCH/daghttp://archive.cs.uu.nl/mirror/dag.wieers/redhat/el5/en/$ARCH/daghttp://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/daghttp://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/$ARCH/daghttp://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el5/en/$ARCH/daghttp://mirrors.ircam.fr/pub/dag/redhat/el5/en/$ARCH/daghttp://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/$ARCH/daghttp://rpmfind.net/linux/dag/redhat/el5/en/$ARCH/daghttp://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el5/en/$ARCH/daghttp://www.mirrorservice.org/sites/apt.sw.be/redhat/el5/en/$ARCH/dag

?2.新建文件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/dagmirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforgeenabled = 1protect = 0gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6gpgcheck = 1

?3.修改这2个文件权限,先执行一下rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt注册RPM-GPG-KEY.dag,最后测试一下,执行yum clean all

4.这样就可以直接更新到这些新源了,然后执行yum search rz试试,等全部更新完就OK了

5.CentOS5和CentOS6均成功

6.附件上传了以上2个文件

热点排行