一直不用yum,但有时包太多,确实太麻烦.譬如装wine
先挂载iso镜像:
mount -o loop /data/rhel-5.4-64bit.iso /media/cdrom相关配置:在
/etc/yum.repos.d下新建规则:
dvd.repo,内容如下:
[dvd]
name=install dvd
baseurl=file:///media/cdrom/Server
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
这些配好后会在system-config-packages中可选
yum-downloadonly配置文件:
/etc/yum/pluginconf.d/security.conf
默认的下载会到
/var/cache/yum/{RepositoryName}/packages这个目录下.
关于 This system is not registered with RHN
cd /etc/yum.repos.d
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
mv rhel-debuginfo.repo rhel-debuginfo.repo.bak
mv CentOS-Base.repo rhel-debuginfo.repo
以上为RHEL,CENTOS上有点不同
一 首先得把mv CentOS-Base.repo CentOS-Base.repo.bak
二 检查CentOS-Media.repo
检查其baseurl
将enabled=1
三 yum clean all
yum list