What is the best way to specify which mirrors off a repository you want to use? Have a host with rather restricted egress rules and want to allow it to reach a couple of mirrors for each repo it needs. And, yes, I am not ready to mirror them locally.
On 1/19/2017 1:57 PM, Mauricio Tavares wrote:> What is the best way to specify which mirrors off a repository you want to > use? Have a host with rather restricted egress rules and want to allow it > to reach a couple of mirrors for each repo it needs. And, yes, I am not > ready to mirror them locally.specify a mirror directly in the /etc/yum.repos.d/CentOS-*.repo files, using baseurl= instead of mirrorlist or, to be trickier [1] you could have mirrorlist.centos.org in your local DNS point to a local http server which has entries like... http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os containing (for example) http://centos.mirror.lstn.net/6/os/x86_64/ http://mirror.n5tech.com/CentOS/6/os/x86_64/ http://mirrors.xmission.com/centos/6/os/x86_64/ http://www.gtlib.gatech.edu/pub/centos/6/os/x86_64/ http://mirrors.rit.edu/centos/6/os/x86_64/ http://repos.lax.quadranet.com/centos/6/os/x86_64/ http://ftpmirror.your.org/pub/centos/6/os/x86_64/ http://repo1.ash.innoscale.net/centos/6/os/x86_64/ http://mirrors.maine.edu/CentOS/6/os/x86_64/ http://mirror.fileplanet.com/centos/6/os/x86_64/ -- john r pierce, recycling bits in santa cruz
On 01/19/2017 03:57 PM, Mauricio Tavares wrote:> What is the best way to specify which mirrors off a repository you want to > use? Have a host with rather restricted egress rules and want to allow it > to reach a couple of mirrors for each repo it needs. And, yes, I am not > ready to mirror them locally.You can do this many was .. if the mirrors you want to use are always the same, you can just remark out the mirrorlist line and use more than one baseurl, like this in your .repo file: baseurl=http://192.168.0.5/centos/$releasever/os/$basearch/ http://192.168.0.10/centos/$releasever/os/$basearch/ (in case this wraps .. each url can be seperated by white space and only one baseurl=) You can also, if you want, write your own mirrorlist providing app .. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20170121/09ea4da1/attachment-0001.sig>