I had quite a time getting Virtual Box’s guest additions to install on Red Hat Enterprise 5. Typically you just install the linux headers and GCC, but the package manager didn’t seem to pick the right ones. So I have the commands here that will get you up and going. Open up Terminal, use the root account and type following yum commands to install the correct software:

yum install -y gcc kernel sources kernel-devel

You might have a problem with OpenGL and Dynamic Kernel Module Support (DKMS), but you can run these commands if you have trouble with it.

yum install dkms

Then reboot and install Guest Additions as normal!