CentOS - Yum - Specify Mirror
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 http://mirrors.usc.edu/.
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:
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.usc.edu/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.usc.edu/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1
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