分类: LINUX
2009-04-06 20:45:23
外国的yum源很慢,而且国内有很好的,因此这个源最好是设置国内的,国内的最好的有北邮的,清华的,上海交大的。 步骤如下: 首先是先安装yum-fastestmirror插件,选择自动选择最快的源 #yum install yum-fastestmirror -y 其次: 在/etc/yum.repos.d下,新建文件sjtuedu.repo内容如下: [sjtuedu] name=Fedora $releasever - $basearch-Updates baseurl=ftp://ftp.sjtu.edu.cn/freshrpms/ayo/fedora/linux/$releasever/i386/tupdates/ ftp://ftp.bupt.edu.cn/pub/mirror/fedora/linux/updates/$releasever/$basearch/ ftp://ftp.bupt.edu.cn/pub/mirror/fedora/linux/updates/$releasever/SRPMS/ #mirrorlist= ftp://ftp3.tsinghua.edu.cn/mirror/livna/fedora/updates/$releasever/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY file:///etc/pki/rpm-gpg/RPM-LIVNA-GPG-KEY 这个RPM-LIVNA-GPG-KEY文件放在/etc/pki/rpm-gpg/下,内容可自己到 ftp://ftp3.tsinghua.edu.cn/mirror/livna就可下载 而RPM-GPG-KEY文件放在/etc/pki/rpm-gpg/下,内容在ftp://ftp.sjtu.edu.cn/freshrpms就可找到,但是会覆盖原来的,不过没有关系。 而北邮电的好像不用KEY的。 至此一切OK。 再尝试在终端输入如下命令, yum install fuse 就发现很快了。 有的时候提示说什么新建的文件有问题,要用http,ftp等的url,仔细检查一下自己的文件,一般是没有问题的 修改fedora自带的更新源: 然后修改这2个文件。 # gedit fedora.repo 弹出文本编辑器后,把所有内容删除。替换成下列内容。根据你自己的网速也可以精简解个最快的源。 内容如下: [fedora] name=Fedora $releasever - $basearch failovermethod=priority #baseurl=red baseurl= $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ http://sunsite.mff.cuni.cz/MIRRO ... com/linux/releases/$releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ $releasever/Everything/$basearch/os/ #mirrorlist= enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY 然后修改 fedora-updates.repo这个文件 # gedit fedora-updates.repo 弹出编辑器后,将内容替换为如下内容: [updates] name=Fedora $releasever - $basearch - Updates failovermethod=priority baseurl= $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ http://sunsite.mff.cuni.cz/MIRRO ... .com/linux/updates/$releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ $releasever/$basearch/ #mirrorlist= enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora 此时YUM就基本上OK了。最好添加一个LIVNA的源。更新速度一直不错。 可以手动创建livna.repo也可以直接下载RPM包进行安装。 在此我使用了RPM包。原因是方便。 登录地址: rpm.livna.org 直接选择FC8就可以了。 这是文件会自动下载到你的用户文件甲的下载目录里。如果不需要了可以删除它。 | ||
|