1. mount -o loop rhel-5-server-dvd.iso /media/rhel
2. vi /etc/yum.repos.d/local.repo
[Cluster]
name=Oracle Enterprise Linux $releasever - $basearch - Cluster
baseurl=file:///mnt/cdrom/Cluster
enabled=1
gpgcheck=0
[ClusterStorage]
name=Oracle Enterprise Linux $releasever - $basearch - ClusterStorage
baseurl=file:///mnt/cdrom/ClusterStorage
enabled=1
gpgcheck=0
[Server]
name=Oracle Enterprise Linux $releasever - $basearch - Server
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
[VT]
name=Oracle Enterprise Linux $releasever - $basearch - VT
baseurl=file:///mnt/cdrom/VT
enabled=1
gpgcheck=0
3. mkdir -p /var/oel/{Cluster,ClusterStorage,Server,VT}
4. mount /dev/hdc /mnt/cdrom
5.
createrepo -o /var/oel/Cluster -g /mnt/cdrom/Cluster/repodata/comps-rhel5-cluster.xml /mnt/cdrom/Cluster
createrepo -o /var/oel/ClusterStorage -g /mnt/cdrom/ClusterStorage/repodata/comps-rhel5-cluster-st.xml /mnt/cdrom/ClusterStorage
createrepo -o /var/oel/Server -g /mnt/cdrom/Server/repodata/comps-rhel5-server-core.xml /mnt/cdrom/Server
createrepo -o /var/oel/VT -g /mnt/cdrom/VT/repodata/comps-rhel5-vt.xml /mnt/cdrom/VT
6.
umount /mnt/cdrom/Cluster/repodata
umount /mnt/cdrom/ClusterStorage/repodata
umount /mnt/cdrom/Server/repodata
umount /mnt/cdrom/VT/repodata
mount --bind /var/oel/Cluster/repodata /mnt/cdrom/Cluster/repodata
mount --bind /var/oel/ClusterStorage/repodata /mnt/cdrom/ClusterStorage/repodata
mount --bind /var/oel/Server/repodata /mnt/cdrom/Server/repodata
mount --bind /var/oel/VT/repodata /mnt/cdrom/VT/repodata
7. yum clean all
8. system-config-packages