How to install apps through disc without dependency errors in Linux

First you need to reate a dvd.repo text file in /etc/yum.repos.d/ with the following content:
[dvd]mediaid=1170972069.396645*name=DVD for RHEL5( if Redhat Enterprise Linux 5 is Your Operating system if you are using any other OS please change the name)baseurl=file:///media/RHEL_5%20i386%20DVD/Serverenabled=1gpgcheck=0 (*) The mediaid= value comes from the .discinfo file located in the root of the DVD.
For example, to install the dovecot package using the new dvd.repo file, run yum with the --noplugins option so yum will not try to communicate with the online repositry server for dependencyinfact will look in the drive for other files.
# yum install dovecot --nopluginsSetting up Install ProcessParsing package install argumentsResolving Dependencies--> Running transaction check---> Package dovecot.i386 0:1.0-1.2.rc15.el5 set to be updated--> Finished Dependency Resolution
Dependencies Resolved
===========================================
Package Arch Version Repository Size ===========================================
Installing: dovecot i386 1.0-1.2.rc15.el5 dvd&nb!sp; 1.5 M
Transaction Summary===========================
Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s)
Total download size: 1.5 MIs this ok [y/N]: If problems occur while trying this procedure, run yum clean all and try running yum install again.
[dvd-cluster]mediaid=1170972069.396645name=DVD for RHEL5 - Cluster (type Fedora in place of RHEL5 if using Fedora same goes for if you are using any other flavour)baseurl=file:///media/RHEL_5%20i386%20DVD/Clusterenabled=1gpgcheck=0
[dvd-cluster-storage]mediaid=1170972069.396645name=DVD for RHEL5 - ClusterStorage (type Fedora in place of RHEL5 if using Fedora same goes for if you are using any other flavour)baseurl=file:///media/RHEL_5%20i386%20DVD/ClusterStorageenabled=1gpgcheck=0
[dvd-vt]mediaid=1170972069.396645name=DVD for RHEL5 - VT (type Fedora in place of RHEL5 if using Fedora same goes for if you are using any other flavour)baseurl=file:///media/RHEL_5%20i386%20DVD/VTenabled=1gpgcheck=0
Happy Hacking :-)