We know Centos 5.x already EOL , and no update given.
But we sometimes still use the version as upgrade will be broke our application usage.
So problem arise when we need to install application package in that version. The repo is moved from main url of the release, and moved to vault.centos.org . To able to install from your yum package manager , we need to update the yum base url.
Here are some command to fix it.
sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
sed -i 's|#baseurl=http://mirror.centos.org/centos/$releasever|baseurl=http://vault.centos.org/5.11|'...