Setting up local yum repository:-

Assuming you have your Linux distribution DVD / CDs copied into a directory named /data/rhel_5.2dvd, then you would setup a yum repository file as shown below, to help you eliminate the need to copy/install individual packages all the time , and use the power of yum instead:-

[root@headnode Server]# cat /etc/yum.repos.d/localmedia.repo  
[rhel-localmedia]  
name=RedHat Enterprise Linux $releasever - $basearch  
baseurl=file:///data/rhel_5.2dvd/Server/  
enabled=1  
gpgcheck=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release  
[root@headnode Server]#    

That is all!