ls /media
mkdir /media/cdrom
mount -r /dev/cdrom /meida/cdrom
cd cdrom/Server/repodata
yum仓库中的元数据文件:
primary.xml.gz
所有RPM包的列表;
依赖关系;
每个RPM安装生成的文件列表;
filelists.xml.gz
当前仓库中所有RPM包的所有文件列表;
other.xml.gz
额外信息,RPM包的修改日志;
repomd.xml
记录的是上面三个文件的时间戳和校验和;
[root@localhost ~]# ls /etc/yum.conf
/etc/yum.conf
[root@localhost ~]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll"gain" the bandwidth ofnot having to
# download the new metadata and"pay"for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE ORIN separate files named file.repo
# in /etc/yum.repos.d
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
redhat.repo rhel-source.repo
[root@localhost yum.repos.d]# ls
redhat.repo rhel-source.repo
[root@localhost yum.repos.d]# cat redhat.repo ## Certificate-Based Repositories# Managed by (rhsm) subscription-manager## *** This file is auto-generated. Changes made here will be over-written. ***# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***## If this file is empty and this system is subscribed consider # a "yum repolist" to refresh available repos#[root@localhost yum.repos.d]# cat rhel-source.repo
[rhel-source]
name=RedHatEnterpriseLinux$releasever - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=RedHatEnterpriseLinux$releaseverBeta - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@localhost yum.repos.d]# cat rhel-source.repo
[rhel-source]
name=RedHatEnterpriseLinux$releasever - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-source-beta]
name=RedHatEnterpriseLinux$releaseverBeta - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release