CentOS mirror

Create your own local CentOS mirror.

See the following documentation:

Pick a suitable mirror to use, then rsync.

What we are going to do:

  • create a mirror of the CentOS 5 release
  • architecture x86_64 only
#!/bin/bash
 
rsync="/usr/bin/rsync -aqHz --delete --delay-updates --bwlimit=256"
 
mirror=rsync://centos.intergenia.de/centos-linux/
 
ver=5
archlist="x86_64"
baselist="os updates"
local=/srv/mirror/centos/repos
 
for arch in $archlist
do
  for base in $baselist
  do
    remote=$mirror/$ver/$base/$arch/
    $rsync $remote $local/$ver/$base/$arch/
  done
done

Once mirrored, don't forget to edit your /etc/yum.repos.d/*.repo files!

centos/mirror.txt · Last modified: 2013-12 by tb
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready