Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to specify a mirror for YUM to target when doing updates? I've noticed on my CentOS 6.2 servers that it takes up to a minute for YUM to respond from a given command. I did some Googling and found that YUM reads from a timedhosts.txt file, so I viewed the contents and it was pretty nasty. There were 49 lines, 32 of which had a value of 99999999999, which I assume to be a timeout.

There has to be a way for me to specify a mirror I know would be lightning fast (being from SoCal I would like to use

share|improve this question
up vote 4 down vote accepted

There is nothing stopping you from disabling the default repos and adding an entry that points to the specific server you want to use. For example:

name=CentOS-$releasever - Base

name=CentOS-$releasever - Updates
share|improve this answer

Do you have the fastest-mirror plugin installed? centos wiki You could edit the base link, in /etc/yum.repos.d/CentOS-Base.repo, to reflect the repo you would like. I am not sure this is best though.similiar to how this was done with the local repo

share|improve this answer
Nice. Looks like I'm not the only one. Came across the following when I googled for 'centos yum disable cache hostfile':… Gonna try it, if it works I'll accept. – Mike Purcell Mar 1 '12 at 2:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.