Fedora 14 安装完后的设置 添加源 更新软件

时间:2022-03-05 03:07:05
1.添加源:
 
(1)上海交大源:应用程序->系统工具->终端
输入 su    输入密码
输入   nano /etc/yum.repos.d/sjtu.repo
辅之以下内容:
[Fedora-ftp.sjtu.edu.cn]
name=Fedora 14 – i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/14/Fedora/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[Everything-ftp.sjtu.edu.cn]
name=Everything 14 – i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/14/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/14/i386/
enabled=1
gpgcheck=0
 
保存即可
(2)163源:
同理,输入 nano /etc/yum.repos.d/163.repo
复制以下内容
[Fedora-mirrors.163.com]
name=Fedora 14 – i386
baseurl=http://mirrors.163.com/fedora/updates/14/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 14 – i386
baseurl=http://mirrors.163.com/fedora/updates/14/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/14/i386/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
 
保存即可
 
(3)sohu源:
操作同上,
输入 nano /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

 
 
再次输入 nano /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

 
保存即可
 
添加完之后,运行yum makecache
 
2.更新软件程序:
 
su  ,输入密码,输入 yum update
 
安装软件多的话,此过程比较长。
 
3.更新系统数据库文件
 
更新完成后重启电脑,进入终端 获取根用户权限后运行 updatedb   更新系统数据库文件
 
4.更新 yum 插件,以加快下载速度
 
 yum 中有的 mirror 速度是非常慢的,如果 yum选择了这个 mirror,这个时候 yum 就会非常慢,
可以下载 fastestmirror 插件和 presto 插件,它会自动选择最快的 mirror。
 
yum install yum-presto -y
yum -y install yum-fastestmirror