[CentOS] Download the repo DAG of CentOS 5.5

Robert Heller heller at deepsoft.com
Sun Apr 3 19:21:58 UTC 2011


At Sun, 03 Apr 2011 14:12:55 -0400 CentOS mailing list <centos at centos.org> wrote:

> 
> hello
> somebody might help to create a script to download the repo DAG of
> CentOS 5.5 to my PC. I already did with OS, Update, and Extras packages.
> I want to do with DAG repository.
> 
> I tried but I don't know much about scripts.
> Thanks
> Fidel

I use a thumb drive to 'mirror' the centos, epel, and rpmforge repos:

mkdirs.sh:
#!/bin/bash
there=`dirname $0`
here=`pwd`
cd $there
there=`pwd`
cd $here
rootdir=`dirname $there`
mkdir -vp $rootdir/adobe/linux/i386/ 
mkdir -vp $rootdir/centos/5/addons/x86_64/
mkdir -vp $rootdir/centos/5/addons/i386
mkdir -vp $rootdir/centos/5/centosplus/x86_64/
mkdir -vp $rootdir/centos/5/centosplus/i386
mkdir -vp $rootdir/centos/5/contrib/x86_64/
mkdir -vp $rootdir/centos/5/contrib/i386
mkdir -vp $rootdir/centos/5/extras/x86_64/
mkdir -vp $rootdir/centos/5/extras/i386
mkdir -vp $rootdir/centos/5/os/x86_64/
mkdir -vp $rootdir/centos/5/os/i386
mkdir -vp $rootdir/centos/5/updates/x86_64/
mkdir -vp $rootdir/centos/5/updates/i386
mkdir -vp $rootdir/epel/5/x86_64/
mkdir -vp $rootdir/epel/5/i386/
mkdir -vp $rootdir/rpmforge/el5/x86_64/
mkdir -vp $rootdir/rpmforge/el5/i386/

centos.sh:
#!/bin/bash
there=`dirname $0`
here=`pwd`
cd $there
there=`pwd`
cd $here
rootdir=`dirname $there`
export RSYNCSERVER="rsync://mirror.clarkson.edu/centos"
export RSYNCCMD="rsync -avP --delete"
$RSYNCCMD $RSYNCSERVER/5/addons/x86_64/ $rootdir/centos/5/addons/x86_64/
#$RSYNCCMD $RSYNCSERVER/5/addons/i386/ $rootdir/centos/5/addons/i386/
$RSYNCCMD $RSYNCSERVER/5/centosplus/x86_64/ $rootdir/centos/5/centosplus/x86_64/
#$RSYNCCMD $RSYNCSERVER/5/centosplus/i386/ $rootdir/centos/5/centosplus/i386/
$RSYNCCMD $RSYNCSERVER/5/contrib/x86_64/ $rootdir/centos/5/contrib/x86_64/
#$RSYNCCMD $RSYNCSERVER/5/contrib/i386/ $rootdir/centos/5/contrib/i386/
$RSYNCCMD $RSYNCSERVER/5/extras/x86_64/ $rootdir/centos/5/extras/x86_64/
#$RSYNCCMD $RSYNCSERVER/5/extras/i386/ $rootdir/centos/5/extras/i386/
#$RSYNCCMD $RSYNCSERVER/5/os/x86_64/ $rootdir/centos/5/os/x86_64/
#$RSYNCCMD $RSYNCSERVER/5/os/i386/ $rootdir/centos/5/os/i386/
$RSYNCCMD $RSYNCSERVER/5/updates/x86_64/ $rootdir/centos/5/updates/x86_64/
#$RSYNCCMD $RSYNCSERVER/5/updates/i386/ $rootdir/centos/5/updates/i386/


epel.sh:
#!/bin/bash
there=`dirname $0`
here=`pwd`
cd $there
there=`pwd`
cd $here
rootdir=`dirname $there`
export RSYNCSERVER="rsync://mirrors.servercentral.net/fedora-epel"
export RSYNCCMD="rsync -avP --delete"
$RSYNCCMD --exclude=/debug/ $RSYNCSERVER/5/x86_64/ $rootdir/epel/5/x86_64/

rpmforge.sh:

#!/bin/bash
there=`dirname $0`
here=`pwd`
cd $there
there=`pwd`
cd $here
rootdir=`dirname $there`
export RSYNCSERVER="rsync://apt.sw.be/pub/freshrpms/pub/dag/redhat/"
export RSYNCCMD="rsync -avP --delete"
$RSYNCCMD $RSYNCSERVER/el5/en/x86_64/rpmforge/ $rootdir/rpmforge/el5/x86_64/
#$RSYNCCMD $RSYNCSERVER/el5/en/i386/rpmforge/ $rootdir/rpmforge/el5/i386/

I use two 16G thumb drives, one for the i386 repos and one for the
x86_64 repos.  I don't bother with the base repo: when there is a point
release, I download the DVD iso(s) and park them on my main machine,
mount them loopback, and nfs export them.  I use thumb drives for the
various updates, because that lets me go somewhere with high-speed
internet and update them.


> 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
>   

-- 
Robert Heller             -- 978-544-6933 / heller at deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                                               



More information about the CentOS mailing list