I made it simple to understand....
1. Install "createrepo" rpm from the Server folder in RHEL DVD
# rpm -ivh /media/RHEL_5.3\ i386\ DVD/Server/createrepo- 0.4.11-3.el5.noarch.rpm
or download from internet...
2. Create a directory under root
# mkdir /data
3. Dump all the cotents in the server forlder of the DVD to /data
#cp /media/RHEL_5.3\ i386\ DVD/Server/* /data
4. After dumping, we have to make the repository available by:
# createrepo -v /data
5. Edit the file /etc/yum.repos.d/rhel-debuginfo.repo
It should look like this:
[root@vixen run]# cat /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///data/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
6. That's it... You can use install any packeges and "yum" will take care of its
dependencies...
Install package
Eg: # yum install gcc-4.1.2-44.el5
Unistall a package
Eg: # yum remove gcc-4.1.2-44.el5