Robin Mordasiewicz
2005-Jun-20 18:15 UTC
[CentOS] script to make a CentOS 4.0 respository updates server...
On Mon, 20 Jun 2005 israel.garcia at cimex.com.cu wrote:> List, I have a CentOS 4.0 server in my intranet which will serves as a > CentOS repository updates, so I need a script to do that job, I can not > use RSYNC. I just want to download CentOS 4.0 updates every night.use dag weirs yam implementation http://dag.wieers.com/home-made/yam/
israel.garcia at cimex.com.cu
2005-Jun-20 19:14 UTC
[CentOS] script to make a CentOS 4.0 respository updates server...
List, I have a CentOS 4.0 server in my intranet which will serves as a CentOS repository updates, so I need a script to do that job, I can not use RSYNC. I just want to download CentOS 4.0 updates every night. Can you help me? Regards, Israel
Paul
2005-Jun-21 01:36 UTC
[CentOS] script to make a CentOS 4.0 respository updates server...
On Mon, 2005-06-20 at 14:14 -0500, israel.garcia at cimex.com.cu wrote:> List, I have a CentOS 4.0 server in my intranet which will serves as a > CentOS repository updates, so I need a script to do that job, I can not > use RSYNC. I just want to download CentOS 4.0 updates every night. > > Can you help me? > > Regards, > Israel >The following script is one I use ... though it could be optimized to just download the RPMs and use createrepo to recreate the metadata. The script I use is as follows: #!/bin/sh # # mirror-centos.sh - Mirror CentOS Linux Updates # # Variables MIRROR="mirror.cs.wisc.edu" WBDIR="pub/mirrors/linux/caosity.org/centos" VERSIONS="4" ARCHS="SRPMS i386 x86_64" WBUPDATES="/home/ftp/pub/centos" PROXY="http://firewall.company.com:8080/" # Limit Transfer Rate to 10K bytes per second MAXRATE="10k" # Do the mirror for d in $VERSIONS; do for y in $ARCHS; do cd $WBUPDATES ## env http_proxy=$PROXY \ wget --non-verbose --no-host-directories --cut-dirs=8 --mirror \ --passive-ftp --limit-rate=$MAXRATE \ --directory-prefix=$WBUPDATES/$d/updates/$y \ ftp://$MIRROR/$WBDIR/$d/updates/$y ##--output-file=/tmp/mirror-centos.log # the RPMS should be checked for valid sigs, not ready for that yet ##rpm --checksig $WBUPDATES/$d/updates/$y/*.rpm | grep 'NOT OK' done done # Done exit
Mark A. Lewis
2005-Jun-21 01:41 UTC
[CentOS] script to make a CentOS 4.0 respository updates server...
Shouldn't we be using rsync instead of wget?> -----Original Message----- > From: centos-bounces at centos.org > [mailto:centos-bounces at centos.org] On Behalf Of Paul > Sent: Monday, June 20, 2005 8:37 PM > To: CentOS mailing list > Subject: Re: [CentOS] script to make a CentOS 4.0 respository > updates server... > > On Mon, 2005-06-20 at 14:14 -0500, israel.garcia at cimex.com.cu wrote: > > List, I have a CentOS 4.0 server in my intranet which will > serves as a > > CentOS repository updates, so I need a script to do that job, I can > > not use RSYNC. I just want to download CentOS 4.0 updates > every night. > > > > Can you help me? > > > > Regards, > > Israel > > > > The following script is one I use ... though it could be > optimized to just download the RPMs and use createrepo to > recreate the metadata. > > The script I use is as follows: > #!/bin/sh > # > # mirror-centos.sh - Mirror CentOS Linux Updates # > > # Variables > MIRROR="mirror.cs.wisc.edu" > WBDIR="pub/mirrors/linux/caosity.org/centos" > VERSIONS="4" > ARCHS="SRPMS i386 x86_64" > WBUPDATES="/home/ftp/pub/centos" > PROXY="http://firewall.company.com:8080/" > > # Limit Transfer Rate to 10K bytes per second MAXRATE="10k" > > # Do the mirror > for d in $VERSIONS; do > for y in $ARCHS; do > cd $WBUPDATES > ## env http_proxy=$PROXY \ > wget --non-verbose --no-host-directories --cut-dirs=8 --mirror \ > --passive-ftp --limit-rate=$MAXRATE \ > --directory-prefix=$WBUPDATES/$d/updates/$y \ > ftp://$MIRROR/$WBDIR/$d/updates/$y > ##--output-file=/tmp/mirror-centos.log > > # the RPMS should be checked for valid sigs, not ready > for that yet > ##rpm --checksig $WBUPDATES/$d/updates/$y/*.rpm | grep 'NOT OK' > done > done > > > # Done > exit > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > > -- > This message has been scanned for viruses and dangerous > content by MailScanner, and is believed to be clean. > >-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Mark A. Lewis
2005-Jun-21 01:42 UTC
[CentOS] script to make a CentOS 4.0 respository updates server...
My bad. Did not read the original post.> -----Original Message----- > From: centos-bounces at centos.org > [mailto:centos-bounces at centos.org] On Behalf Of Mark A. Lewis > Sent: Monday, June 20, 2005 8:42 PM > To: CentOS mailing list > Subject: RE: [CentOS] script to make a CentOS 4.0 respository > updates server... > > Shouldn't we be using rsync instead of wget? > > > -----Original Message----- > > From: centos-bounces at centos.org > > [mailto:centos-bounces at centos.org] On Behalf Of Paul > > Sent: Monday, June 20, 2005 8:37 PM > > To: CentOS mailing list > > Subject: Re: [CentOS] script to make a CentOS 4.0 > respository updates > > server... > > > > On Mon, 2005-06-20 at 14:14 -0500, israel.garcia at cimex.com.cu wrote: > > > List, I have a CentOS 4.0 server in my intranet which will > > serves as a > > > CentOS repository updates, so I need a script to do that > job, I can > > > not use RSYNC. I just want to download CentOS 4.0 updates > > every night. > > > > > > Can you help me? > > > > > > Regards, > > > Israel > > > > > > > The following script is one I use ... though it could be > optimized to > > just download the RPMs and use createrepo to recreate the metadata. > > > > The script I use is as follows: > > #!/bin/sh > > # > > # mirror-centos.sh - Mirror CentOS Linux Updates # > > > > # Variables > > MIRROR="mirror.cs.wisc.edu" > > WBDIR="pub/mirrors/linux/caosity.org/centos" > > VERSIONS="4" > > ARCHS="SRPMS i386 x86_64" > > WBUPDATES="/home/ftp/pub/centos" > > PROXY="http://firewall.company.com:8080/" > > > > # Limit Transfer Rate to 10K bytes per second MAXRATE="10k" > > > > # Do the mirror > > for d in $VERSIONS; do > > for y in $ARCHS; do > > cd $WBUPDATES > > ## env http_proxy=$PROXY \ > > wget --non-verbose --no-host-directories --cut-dirs=8 --mirror \ > > --passive-ftp --limit-rate=$MAXRATE \ > > --directory-prefix=$WBUPDATES/$d/updates/$y \ > > ftp://$MIRROR/$WBDIR/$d/updates/$y > > ##--output-file=/tmp/mirror-centos.log > > > > # the RPMS should be checked for valid sigs, not ready for that > > yet > > ##rpm --checksig $WBUPDATES/$d/updates/$y/*.rpm | grep 'NOT OK' > > done > > done > > > > > > # Done > > exit > > > > _______________________________________________ > > CentOS mailing list > > CentOS at centos.org > > http://lists.centos.org/mailman/listinfo/centos > > > > -- > > This message has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > -- > This message has been scanned for viruses and dangerous > content by MailScanner, and is believed to be clean. > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.