yum 配置
测试环境:
[root@kevin-test ~]# uname -r
2.6.18-1.2798.fc6
[root@kevin-test ~]# yum --version
Loading "installonlyn" plugin
3.0
[root@kevin-test ~]# rpm -qa|grep -i yum
yum-3.0-6
yum-arch-2.2.2-2.fc6
yum-metadata-parser-1.0-8.fc6
yum-fedorafaq-6-2007.02.03
yum-updatesd-3.0-6
注意相关配置文件修改(FC6):
[root@kevin-test ~]# cd /etc/
[root@kevin-test etc]# less yum.conf
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
这个/etc/yum.conf文件没有更改。
进入/etc/yum.repos.d文件夹,更改以下三个文件的部分内容:
fedora-core.repo 里的
#baseurl=
$releasever/$basearch/os/ 改为:
baseurl=
/$releasever/$basearch/os/
fedora-extras.repo 里的
#baseurl=
$releasever/$basearch/ 改为:
baseurl=
as/$releasever/$basearch/
fedora-updates.repo 里的
#baseurl=update
s/$releasever/$basearch/ 改为:
baseurl=
/updates/$releasever/$basearch/
说明:首先要将这里的注释“#”删除。否则会报错。错误提示如下:
Error: Cannot find a valid baseurl for repo: updates
其次需要更改baseurl的链接,可能是redhat已经不提供fedora 6的更新了。错误
提示如下:
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: extras
阅读(2020) | 评论(0) | 转发(0) |