The previous posts tried to explain that because you installed RHEL 5, but probably are not paying a subscription, you cannot use the RHEL repositories for installing software. Since Centos 5 aims, and is pretty successful, at being 100% binary compatible with RHEL 5, you can change the software repository used by the yum package manager to refer to Centos 5 sites instead of the official RHEL 5 sites with minimal, if any, disruption. The following site shows how to do this. It is merely a matter of changing the contents of the file stored in /etc/yum.repos.d/ using a text editor:
You will then be able to issue the yum commands to install all the normal software packages as suggested in the posts above.
Hope this helps. Keep posting with questions and problems you experience.
The CentOS people take advantage of the fact that Red Hat releases their software under the General Public License to just blatantly copy all the source code for you free use. They just have to remove the other aspects of the Red Hat's intellectual property that are not covered by the GPL (trademarks). They host the blatantly copied source code on their own servers.
This is why you need to change the contents of the file in the /etc/yum.repos.d/ directory. You need to tell yum to stop looking at the offical RHEL servers for software and instead look at Centos' servers.