二.了解yum软件库配置
打开/etc/yum.repos.d可以看到软件库
[lxuser@Fedora8 yum.repos.d]$ ls
fedora-development.repo fedora.repo fedora-updates-testing.repo
Fedora-install-media.repo fedora-updates.repo
添加一个软件库的准备工作是要明确你需要添加的软件库的确切位置GPG密钥(GNU Private Guard ,一种密钥方法,实现RFC2440 中定义的OpenGPG标准,自由软件,GPG提供命令行形式的应用,可以轻松集成到其它应用程序中)
打开fedora.repo
[root@fedora8 yum.repos.d]# vi fedora.repo
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedora.RedHat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
$releasever 其实就是你fedora的版本号
$basearch 这个对于我这电脑来说就是i386
#baseurl 是基本地址
mirrorlist 镜像列表
enabled=1 本repo是否激活
gpgcheck=1 是否启用gpg检查
gpgkey 是GPG密钥的地址
据我所知道的yum的方法(还不一定准确)yum会检查 baseurl/repodata/repomd.xml 这个索引文件,还有PGPKEY,找不到的会失败。所以添加软件库的时候要注意一下,特别是第3方软件库