Created a new HowTo on running your own local mirror: http://wiki.centos.org/HowTos/CreateLocalMirror Comments and (constructive :-) criticism are invited. Phil
On Sat, Apr 4, 2009 at 1:37 PM, Phil Schaffner <P.R.Schaffner at ieee.org> wrote:> Created a new HowTo on running your own local mirror: > http://wiki.centos.org/HowTos/CreateLocalMirror > > Comments and (constructive :-) criticism are invited.Good work, Phil. <- constructive note. You might want to add 'lftp' as an alternative method to rsync. I have been using lftp because rsync at work is capped at a miserably low speed. Also, there are more http / ftp sites available than rsync sites. It is also a one-liner. For example: lftp -e 'open http://<some.site>/centos/ && mirror -c --delete 5.3 && exit' will mirror the whole 5.3 under the remote centos/ directory. Regarding the baseurl=file:/ line in the .repo file, I always thought it required three slashes. I now realize that a single slash is all you need. :) Thanks for the useful article. Akemi
On Sat, Apr 04, 2009 at 04:37:19PM -0400, Phil Schaffner wrote:> Created a new HowTo on running your own local mirror: > http://wiki.centos.org/HowTos/CreateLocalMirror > > Comments and (constructive :-) criticism are invited. >nice writeup, just my 2 cents: consider adding a lockfile if the script is used automatically in a crontab ;) ... # try to create the lock and check the outcome LOCKFILE=/var/run/rsync-home.lock lockfile -r 0 ${LOCKFILE} 1>/dev/null 2>&1 status=$? if [ ${status} -ne 0 ] ;then echo "Another instance already running. Aborting." exit 1 fi trap "rm ${LOCKFILE}" EXIT # body of the script here ... other examples are also available in the centos-mirror mailing list archives. Cheers, Tru -- Tru Huynh (mirrors, CentOS-3 i386/x86_64 Package Maintenance) http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBEFA581B -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos-docs/attachments/20090405/10ed2022/attachment-0003.sig>
Am Samstag, den 04.04.2009, 22:37 +0200 schrieb Phil Schaffner:> Created a new HowTo on running your own local mirror: > http://wiki.centos.org/HowTos/CreateLocalMirror > > Comments and (constructive :-) criticism are invited. > > Phil >A note mentioning mrpeo would also be nice (http://dag.wieers.com/home-made/mrepo/) Chris financial.com AG Munich head office/Hauptsitz M?nchen: Maria-Probst-Str. 19 | 80939 M?nchen | Germany Frankfurt branch office/Niederlassung Frankfurt: Messeturm | Friedrich-Ebert-Anlage 49 | 60327 Frankfurt | Germany Management board/Vorstand: Dr. Steffen Boehnert (CEO/Vorsitzender) | Dr. Alexis Eisenhofer | Dr. Yann Samson | Matthias Wiederwach Supervisory board/Aufsichtsrat: Dr. Dr. Ernst zur Linden (chairman/Vorsitzender) Register court/Handelsregister: Munich ? HRB 128 972 | Sales tax ID number/St.Nr.: DE205 370 553
On Sun, 2009-04-05 at 00:16 +0200, Tru Huynh wrote:> On Sat, Apr 04, 2009 at 04:37:19PM -0400, Phil Schaffner wrote: > > Created a new HowTo on running your own local mirror: > > http://wiki.centos.org/HowTos/CreateLocalMirror > > > > Comments and (constructive :-) criticism are invited. > > > nice writeup, just my 2 cents: consider adding a lockfile if the script > is used automatically in a crontab ;) > > ... > # try to create the lock and check the outcome > LOCKFILE=/var/run/rsync-home.lock > lockfile -r 0 ${LOCKFILE} 1>/dev/null 2>&1 > status=$? > > if [ ${status} -ne 0 ] ;then > echo "Another instance already running. Aborting." > exit 1 > fi > trap "rm ${LOCKFILE}" EXIT > > # body of the script here > ... > > other examples are also available in the centos-mirror mailing list archives. > > Cheers, > > Tru---\ But not like this above JohnStanley
Phil Schaffner wrote:> Created a new HowTo on running your own local mirror: > http://wiki.centos.org/HowTos/CreateLocalMirror > > Comments and (constructive :-) criticism are invited.you could potentially replace most of that article with a 2 line script running reposync. Since we ship it, might be worth talking about it. -- Karanbir Singh : http://www.karan.org/ : 2522219 at icq