mkdir -p /mnt/lpsiso

mount /tmp/RedHat-EL5-Security-PatchXXXXX.iso /mnt/lpsiso -o loop

cd /mnt/lpsiso

现在配置源点配置文件:

cd /etc/yum.repos.d

cp -p rhel-debuginfo.repo my.repo //以rhel-debuginfo.repo为模版创建源点的配置文件

my.repo的内容为:

[root@bogon yum.repos.d]# less my.repo

[rhel]

name=Red Hat

baseurl=file:///mnt//lpsiso/Server //路径

enabled=1 //是否启用源点

gpgcheck=1 //解决包之间的依赖性

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


yum clean

yum list