Much better to download and install packages from CentOS; http://www.centos.org/
If fact the wiki has instructions on to use yum and the repos on RHEL. Also CentOS5 is available, it is 100% binary compatible with RHEL5 ES/AS.
Replacing the glib and associated packages is tricky, one false step and the system is junk. Please be extremely careful.