在向大家详细介绍Linux YUM之前,首先让大家了解下Linux YUM,然后全面介绍Linux YUM,希望对大家有用。Fedora 10的Linux YUM源设置。RPM Fusion 团队宣布 Fedora 10 的软件仓库可以使用了!
RPM Fusion 由之前的 Dribble,Freshrpms,和 Livna 合并而来并成为一个超级软件仓库,专门为 Fedora,CentOS以及RHEL提供官方不能提供的软件。Fedpra 10为我们带来了很多 Linux 的最新特性,比如,F10 可以自动搜索并安装播放视频所必须的解码器了。RPM Fusion 包含大量的多媒体解码器,以及大量 nVidia 显卡等受限驱动。rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpmhttp://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm。
虽然 RPM Fusion 合并了其它三个软件仓库,但是并不包括著名的 ATrpms 源,ATrpms 的 Fedora 10 软件仓库也发布了,要安装atrpms源:
rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-10-2.fc10.i386.rpm第三方软件仓库 Adobe:rpm -ivh http://linuxdownload.adobe.com/linux/i386/adobe-release-i386-1.0-1.noarch.rpmrpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux。
另外,这里再给出添加国内上海交大源的设置,在开始之前,首先确保你安装了如下软件,补上尚未安装的。执行以下命令:yum -y install gcc make subversion。
首先增加上海交大的更新源:(如果你有更好的更新源段,欢迎评论给出,谢谢!)gedit /etc/yum.repos.d/sjtu.repo 在打开的空白窗口中加入
- Fedora-ftp.sjtu.edu.cn]
- name=Fedora 10 - i386
- baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/10/Fedora/i386/os/
- enabled=1
- gpgcheck=0
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
- [Everything-ftp.sjtu.edu.cn]
- name=Everything 10 - i386
- baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/10/Everything/i386/os/
- enabled=1
- gpgcheck=0
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
- [updates-ftp.sjtu.edu.cn]
- name=Fedora updates
- baseurl=http://ftp.sjtu.edu.cn/fedora/linux/updates/10/i386/
- enabled=1
- gpgcheck=0
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
注意大小写,网上有几篇文章中的大小写错误,会导致404 Not Found,然后保存退出。然后依次执行:
[下面的内容非常重要]比如在yum install audacious* 的过程中出现如下情况:audacious-plugin-fc i386 0.3-1Everything-ftp.sjtu.edu.cn
下载包错误:
audacious-plugin-fc-0.3-1.i386: [Errno 256] No more mirrors to try.
也就是当前Linux YUM源都已经不可用. 使用Google: 会有如下的一条条查找结果:#Index of /pub/linux/distributions/fedora/linux/releases/10 ...30-Oct-2008 21:31 45672 audacious-plugin-fc-0.3-1.i386.rpm 30-Oct-2008 21:31 31788 audacious-plugins-1.5.1-2.fc10.i386.rpm 30-Oct-2008 21:31 1337465 ...
ftp.freepark.org/pub/linux/distributions/fedora/linux/releases/.../Packages/
Index of /fedora/releases/10/Everything/i386/os/Packages/
audacious-plugin-fc-0.3-1.i386.rpm, 2008-Oct-30 16:31:19, 31.0K, application/octet-stream. audacious-plugins-1.5.1-2.fc10.i386.rpm, 2008-Oct-30 16:31:22 ...
mirror.fdcservers.net/fedora/releases/10/Everything/i386/os/Packages/
Index of /pub/linux/fedora/linux/releases/10/Everything/i386/os ...
audacious-plugin-fc-0.3-1.i386.rpm 30-Oct-2008 22:31 31K [ ] audacious-plugins-1.5.1-2.fc10.i386.rpm 30-Oct-2008 22:31 1M [ ] ...
ftp.wcss.pl/pub/linux/fedora/linux/releases/10/Everything/.../Packages/
也就是说,上述网站提供了Fedora镜像,如果能进入到其中的文件夹找到audacious-plugin-fc-0.3-1.i386,则此镜像是可以使用的。那么,我们可以把这个镜像加入到/etc/yum.repo.d/下。方法也很简单,只要把像上面sjtu.repo文件中的baseurl的值和镜像中的目录对应起来,表示这样可以获得那些安装文件即行了。
更详细的配置文件如下例:
- [tummy]
- name=Tummy Fedora $releasever - $basearch
- failovermethod=priority
- baseurl=http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/releases/$releasever/Everything/$basearch/os/
- enabled=1
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
- [tummy-debuginfo]
- name=Tummy Fedora $releasever - $basearch - Debug
- failovermethod=priority
- baseurl=http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/releases/$releasever/Everything/$basearch/debug/
- enabled=1
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
- [tummy-source]
- name=Tummy Fedora $releasever - Source
- failovermethod=priority
- baseurl=http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/releases/$releasever/Everything/source/SRPMS/
- enabled=1
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
- [tummy-Everything]
- name=Tummy Everything $releasever - $basearch
- baseurl=http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/releases/$releasever/Everything/$basearch/os/
- enabled=1
- gpgcheck=0
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
- [tummy-updates]
- name=Tummy Fedora $releasever - $basearch - Updates
- failovermethod=priority
- baseurl=http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/updates/$releasever/$basearch/
- enabled=1
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
- [tummy-updates-debuginfo]
- name=Tummy Fedora $releasever - $basearch - Updates - Debug
- failovermethod=priority
- baseurl=http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/updates/$releasever/$basearch/debug/
- enabled=1
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
- [tummy-updates-source]
- name=Tummy Fedora $releasever - Updates Source
- failovermethod=priority
- baseurl=http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/updates/$releasever/SRPMS/
- enabled=1
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
上面的工作结束后,做一些收尾工作吧。
重新建立Linux YUM的缓存(download and make usable all the metadata for the currently enabled yum repos)yum makecache