Change to Fastest Mirror for Yum

0

When you ran yum for the first time and it will select a mirror automatically for you which sometime was really slow. This will caused package updates and installation were taking a lot of time to finish. Actually you can to a different repo manually to nearest locations to your server.

To force yum-fastestmirror plugin to check for fastest mirrors, you must delete the file /var/cache/yum/timedhosts.txt by running the following command as root:

rm /var/cache/yum/timedhosts.txt

Then, running yum will check for fastest mirror next time it is run. It should pick up a better mirror, but sometimes there is a case that it kept pick the same mirror over and over again. You can block it so that yum-fastestmirror is forced to choose another one. To do that, open the file /etc/yum/pluginconf.d/fastestmirror.conf as root and uncommented the line (removed the “#”) with “exclude” and added the bad mirror such as “mirror.repo.dom” (change to the one that you want to block according to your installation) to the exclude list so that the line looked like the following:

exclude=mirror.repo.dom

If yum-fastestmirror keeps on giving selecting slow mirrors, you can add additional mirrors to the exclude list (separate mirror names with commas) and remove /var/cache/yum/timedhosts.txt again and repeat it again until you are satisfied with the performance.

Leave a Reply

Main Navigation