在我的ACER3682的笔记本上装了 Fedora , 类似 Ubuntu 中的新立得, fedora 中可以使用 yum 来安装软件,并且可以比较好的解决软件的依赖关系. 首先需要配置源: 在 /etc/yum.repos.d 下面创建两个文件:
第一个是 fedora-sjt, 内容为 :
[base-sjtu]
name=Fedora Core $releasever – $basearch – Base
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/core/$releasever/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[extras-sjtu]
name=Fedora Extras $releasever – $basearch
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/extras/$releasever/$basearch/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
[updates-sjtu]
name=Fedora Core $releasever – $basearch – Released Updates
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/core/updates/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
第二个文件起名 Fedora-ts, 内容:
[base-ts]
name=Fedora Core $releasever – $basearch – Base
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.RedHat.com/pub/fedora/linux/core/$releasever/$basearch/os/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[extras-ts]
name=Fedora Extras $releasever – $basearch
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1
[updates-ts]
name=Fedora Core $releasever – $basearch – Released Updates
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[freshrpms-ayo]
name=Fedora Core $releasever – $basearch – Freshrpms
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/ayo.freshrpms.net/pub/freshrpms/ayo/fedora/linux/$releasever/$basearch/freshrpms/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms
enabled=1
[livna]
name=Fedora Core $releasever – $basearch – livna
baseurl=ftp://ftp3.tsinghua.edu.cn/mirror/livna/fedora/$releasever/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms
然后就可以安装软件了, 比如 :
yum install yumex
将会安装 yum 的图形界面前端, 可以像新立得一样方便的下载所需的软件
记住两个命令行选项 –enablerepo 和 –disablerepo
这两个选项可以混合用,比如先 –disablerepo=\* 然后 –enablerepo=base-sjtu
因为如果已经知道只有一个仓库有自己想要的软件(和依赖关系),那么同时启用其他仓库就有些浪费时间,解析依赖关系时出错的可能性更大。