Rebuild your the default CentOS yum.repo.d folder
On a dev machine, somehow, I managed to erase my yum.repo.d contents. I wanted to rebuild the repo files back to their default. First you need to figure out what version you are using:
cat /etc/redhat-release
Then visit the correct release at : http://vault.centos.org/
navigate to the correct os/x86_64/CentOS/ directory (could be os/x86_64/CentOS/ i386/)
Download the following files to the server:
wget http://vault.centos.org/5.x/os/x86_64/CentOS/centos-release-notes-5.x-0.x86_64.rpm
wget http://vault.centos.org/5.x/os/x86_64/CentOS/centos-release-5-x.el5.centos.x86_64.rpm
Then install the two rpms:
rpm -Uivh *.rpm
Should be back to the original shipping repo files.
Credit: By jbmurphy on July 8, 2011 in Linux
Reference - http://www.jbmurphy.com/2011/07/08/rebuild-your-the-default-centos-yum-repo-d-folder/