yum 是Fedora中十分方便的软件包管理工具,但是其默认的源全是国外的站点上的,极大地影响了其下载资源的速度;因此应将其改为国内的镜像,清华大学的镜像站就是教育网内比较完善的镜像站点;建议教育网用户将yum源改为清华大学的镜像,极变态地提高下载速度。
具体操作如下(终端):
1. 获得root权限:
su
2. 将/etc/yum.repo.d改名;
mv /etc/yum.repo.d /etc/yum.repo.d~
若要还原该文件夹则输入:
mv /etc/yum.repo.d~ /etc/yum.repo.d
3.编辑/etc/yum.conf文件:
gedit /etc/yum.conf
将其改为:
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=RedHat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=0
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[extras]
name=Extras
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
enabled=1
[extras-source]
name=Extras
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/SRPMS/
enabled=1
[extras-debug]
name=Extras-debug
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/debug/
enabled=0
[extras-development]
name=Extras-development
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/
enabled=0
[extras-development-debug]
name=Extras-development-debug
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$releasever/debug/
enabled=0
[extras-development-source]
name=Extras-development-source
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/
enabled=0
[updates]
name=Updates
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch
enabled=1
[updates-source]
name=Updates-source
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/SRPMS
enabled=1
[updates-testing]
name=Updates-testing
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/$releasever/$basearch
enabled=0
[updates-testing-debug]
name=Updates-testing-debug
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/$releasever/$basearch/debug/
enabled=0
[updates-testing-source]
name=Updates-testing-source
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/$releasever/SRPMS
enabled=0
[core]
name=Core
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os
新闻热点
疑难解答