Fedora-14源配置
 2022.11.26    |      实用技巧    |     AilsonJack    |     暂无评论    |     239 views
By: Ailson Jack
Date: 2022-11-26
个人博客: http://www.only2fire.com/
<p>系统:Fedora-14-x86_64<br/>我这里的环境是在虚拟机中安装Fedora-14。<br/>由于Fedora-14比较老了,因此配置源以及其他一些操作就有些不一样,这里简单记录下我的配置,方便以后查找。</p><p class="artical_littlestyle1">使用在线源</p><p style="text-indent: 2em;">由于Fedora-14比较古老了,官方不再维护并且将其源路径更改了,因此源的配置也要进行变化。</p><p style="text-indent: 2em;">首先将 /etc/yum.repos.d/fedora.repo 进行备份(可以重命名为 fedora.repo.bak )。</p><p style="text-indent: 2em;">下面是可用的在线源配置,fedora.repo 文件内容如下:</p><pre class="brush:bash;toolbar:false PrismJs">[fedora] name=Fedora&nbsp;$releasever&nbsp;-&nbsp;$basearch failovermethod=priority baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/$basearch/os/ #baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/14/Everything/x86_64/os/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&amp;arch=$basearch enabled=1 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-debuginfo] name=Fedora&nbsp;$releasever&nbsp;-&nbsp;$basearch&nbsp;-&nbsp;Debug failovermethod=priority baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/$basearch/debug/ #baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/14/Everything/x86_64/debug/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&amp;arch=$basearch enabled=0 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-source] name=Fedora&nbsp;$releasever&nbsp;-&nbsp;Source failovermethod=priority baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/source/SRPMS/ #baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/14/Everything/source/SRPMS/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&amp;arch=$basearch enabled=0 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch</pre><p style="text-indent: 2em;">将 /etc/yum.repos.d/fedora.repo 中的文件内容更换为上述内容。</p><p class="artical_littlestyle2">验证在线源是否可用</p><p style="text-indent: 2em;">有可能之后的路径又会更改,在进行更新源操作之前,可以先确认下源的链接是否可用,分别用浏览器打开下面的3个链接,如果都能正常访问,那么说明在线源没有问题。</p><pre class="brush:bash;toolbar:false PrismJs">http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/14/Everything/x86_64/os/ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/14/Everything/x86_64/debug/ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/14/Everything/source/SRPMS/</pre><p style="text-indent: 2em;">如果在线源不能使用了,那么也可以考虑将Fedora-14的安装包 Fedora-14-x86_64-DVD.iso 作为本地源,这个配置在下面章节讲述。<br/></p><p class="artical_littlestyle3">使用本地源</p><p style="text-indent: 2em;">在线源可用的情况下,可以跳过该小节。</p><p style="text-indent: 2em;">如果在线源不能使用了,那么我们可以将Fedora-14的安装包 Fedora-14-x86_64-DVD.iso 作为本地源,fedora.repo 文件内容如下:</p><pre class="brush:bash;toolbar:false PrismJs">[InstallMedia] name=Fedora&nbsp;14 #mediaid=1287685157.683254 #baseurl=file:///media/ baseurl=file:///media/Fedora%2014%20x86_64%20DVD enabled=1 metadata_expire=-1 gpgcheck=0 #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch</pre><p style="text-indent: 2em;">将 /etc/yum.repos.d/fedora.repo 中的文件内容更换为上述内容。</p><p style="text-indent: 2em;">备注:baseurl中的 %20 这里表示空格。</p><p style="text-indent: 2em;">在线源和本地源选择一种即可,建议当在线源不可用时,就使用本地源。<br/></p><p class="artical_littlestyle4">更新源</p><p style="text-indent: 2em;">在更新了 fedora.repo 文件内容之后,依次执行下述命令完成更新源操作。<br/></p><pre class="brush:bash;toolbar:false PrismJs">yum&nbsp;clean&nbsp;all yum&nbsp;makecache yum&nbsp;update</pre><p style="text-indent: 2em;">上述命令执行的过程中没有报错,就表示源更新完成,之后可以使用下述命令查看源列表:</p><pre class="brush:bash;toolbar:false PrismJs">yum&nbsp;repolist</pre><p style="text-indent: 2em;">如果更新源过程中遇到了问题,可以看看下面的章节是否有提到。<br/></p><p class="artical_littlestyle1">更新源遇到的问题</p><p style="text-indent: 0em;"><strong>Cannot retrieve repository metadata</strong><br/></p><p style="text-indent: 2em;">如果更新源的过程中,出现 Error: Cannot retrieve repository metadata (repomd.xml) for repository: updates. Please verify its path and try again 这样的信息,那么将 /etc/yum.repos.d/ 下面 updates 相关的文件进行重命名,我这里将 /etc/yum.repos.d/fedora-updates.repo 重命名为 /etc/yum.repos.d/fedora-updates.repo.bak 。</p><p style="text-indent: 2em;">如果更新源的过程中,出现 Error: Cannot retrieve repository metadata (repomd.xml) for repository: salt-latest. Please verify its path and try again 这样的信息,那么将 /etc/yum.repos.d/ 下面 salt-latest 相关的文件进行重命名 。</p><p style="text-indent: 2em;">经过上述的步骤之后,Fedora-14的源就配置好了,可以试试yum下载文件,应该OK了吧。<br/></p>
欢迎关注博主的公众号呀,精彩内容随时掌握:
热情邀请仔细浏览下博客中的广告,万一有对自己有用或感兴趣的呢。◕ᴗ◕。。
如果这篇文章对你有帮助,记得点赞和关注博主就行了^_^,当然了能够赞赏博主,那就非常感谢啦!
注: 转载请注明出处,谢谢!^_^
转载请注明来源: 本文链接:  By: AilsonJack
Fedora-14源配置  |  说好一起走
暂无评论,要不要来个沙发
发表评论

 
Copyright © 2015~2023  说好一起走   保留所有权利   |  百度统计  蜀ICP备15004292号