感谢支持
我们一直在努力

为Fedora 16设置国内yum源

1)先删除/etc/yum.repos.d/下的所有文件
2)添加上海交大源,将以下内容保存为 /etc/yum.repos.d/sjtu.repo

[Fedora-ftp.sjtu.edu.cn]
name=Fedora 16 – i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/16/Fedora/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[Everything-ftp.sjtu.edu.cn]
name=Everything 16 – i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/16/Everything/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[updates-ftp.sjtu.edu.cn]
name=Fedora updates
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/updates/16/i386/
enabled=1
gpgcheck=0


3)添加163源,将以下内容保存为 /etc/yum.repos.d/163.repo

[Fedora-mirrors.163.com]
name=Fedora 16 – i386
baseurl=http://mirrors.163.com/fedora/updates/16/i386/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[Everything-mirrors.163.com]
name=Everything 16 – i386
baseurl=http://mirrors.163.com/fedora/updates/16/i386/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[updates-mirrors.163.com]
name=Fedora updates
baseurl=http://mirrors.163.com/fedora/updates/16/i386/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY


4)添加搜狐源
将以下内容保存为/etc/yum.repos.d/fedora-sohu.repo

[fedora]
name=Fedora $releasever – $basearch – sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/fedora/releases/$releasever/Everything/$basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-debuginfo]
name=Fedora $releasever – $basearch – Debug – sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/fedora/releases/$releasever/Everything/$basearch/debug/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-source]
name=Fedora $releasever – Source – sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/fedora/releases/$releasever/Everything/source/SRPMS/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch




将以下内容保存为/etc/yum.repos.d/fedora-updates-sohu.repo

[updates]
name=Fedora $releasever – $basearch – Updates – sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/fedora/updates/$releasever/$basearch/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[updates-debuginfo]
name=Fedora $releasever – $basearch – Updates – Debug – sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/fedora/updates/$releasever/$basearch/debug/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[updates-source]
name=Fedora $releasever – Updates Source – sohu.com
failovermethod=priority
baseurl=http://mirrors.sohu.com/fedora/updates/$releasever/SRPMS/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch




5)在终端里依次运行yum clean all 和yum makecache即可

赞(0) 打赏
转载请注明出处:服务器评测 » 为Fedora 16设置国内yum源
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏