当前位置: 技术问答>linux和unix
yum源的机制问题
来源: 互联网 发布时间:2017-02-19
本文导语: 本帖最后由 painie2 于 2012-04-28 11:53:58 编辑 对于yum源,我感觉很奇怪的,譬如centos吧,版本那么多,隔几个月就出来一个新版本,从原理上来说,同一个rpm包可能在不同版本的centos上就不能兼容。但yum或者rpm机制根据...
centos如出一个新版本,那么是不是原来yum源里的所有rpm包就都失效了呢?
|
你看下源的配置文件,里面大部分的路径都不是确定的,有些类似$bserach,$version,$release之类的变量,好像是yum会根据你的系统的版本对应的变量值生成完整的网络路径,然后下载对应的包
|
[root@fangzhaoguo ~]# less /etc/yum.repos.d/fedora.repo
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever
/Everything/$basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&ar
ch=$basearch
enabled=1
#metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever
/Everything/$basearch/debug/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$release
ver&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever
/Everything/source/SRPMS/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releas
ever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
里面对应有版本号的,而且你可以去查看一下镜像网站的资源就明白了