1. 挂载 rhel-server-5.5-x86_64-dvd.iso
2. mount /dev/cdrom /media
3. cd /media/Server
4. rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
5. cd /media
6. cp -rf * /mnt
7. umount /media
8. cd /mnt
9. 创建yum资料库
createrepo -g /u01/mnt/Cluster/repodata/repomd.xml /u01/mnt/Cluster/
createrepo -g /u01/mnt/ClusterStorage/repodata/repomd.xml /u01/mnt/ClusterStorage/
createrepo -g /u01/mnt/Server/repodata/repomd.xml /u01/mnt/Server/
createrepo -g /u01/mnt/VT/repodata/repomd.xml /u01/mnt/VT/
10. 创建本地yum配置文件目录: cd /etc/yum.repos.d
[rhel-Server]
name=Red Hat Enterprise Linux Server
baseurl=file:///u01/mnt/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-Cluster]
name=Red Hat Enterprise Linux Cluster
baseurl=file:///u01/mnt/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-ClusterStorage]
name=Red Hat Enterprise Linux ClusterStorage
baseurl=file:///u01/mnt/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-VT]
name=Red Hat Enterprise Linux VT
baseurl=file:///u01/mnt/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release