I figured I try if I can mirror the base and updates repos locally. There's no tutorial for that, only one about creating your own repo of packages which is not the same. So, I just mirrored all the stuff with wget and changed the baseurl in the repo files and hoped that's enough. Works. So easy you don't need a tutorial. *But* I then realized that the updates directory contains *all* updates, not just the latest. Which means if I don't regularly check I may get old versions mirrored I don't want. It also means that I get a lot of unwanted files at the time I start to mirror. And I cannot delete old files as these would again be mirrored in. An obvious solution would be to check each day and tell wget (or whatever software I use) to ignore files older than 24 hours. Still, this means the initial download has to get them all and I have to delete all unwanted old files manually. Is there a better solution? Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
Kai Schaetzl wrote:> > I figured I try if I can mirror the base and updates repos locally. > There's no tutorial for that, only one about creating your > own repo of > packages which is not the same. So, I just mirrored all the > stuff with > wget and changed the baseurl in the repo files and hoped > that's enough. > Works. So easy you don't need a tutorial. > *But* I then realized that the updates directory contains > *all* updates, > not just the latest. Which means if I don't regularly check I > may get old > versions mirrored I don't want. It also means that I get a > lot of unwanted > files at the time I start to mirror. And I cannot delete old files as > these would again be mirrored in. > An obvious solution would be to check each day and tell wget > (or whatever > software I use) to ignore files older than 24 hours. Still, > this means the > initial download has to get them all and I have to delete all > unwanted old > files manually. > Is there a better solution?Yes a lot of past versions are kept in the repo, but if you filter those out then it wouldn't be a "mirror" then? Be careful with the "repomd.xml" file, delete it before starting to mirror to make sure it doesn't get out-of-sync, because, at least on my end, I find that wget via http doesn't compare time stamps just sizes/names and the sha1 checksums are always the same length. Here's a little script: #!/bin/sh VERSION=5.0 mkdir -p /Software/CentOS/$VERSION/updates/i386 >/dev/null 2>&1 mkdir -p /Software/CentOS/$VERSION/updates/x86_64 >/dev/null 2>&1 rm -f /Software/CentOS/$VERSION/updates/i386/repodata/repomd.xml >/dev/null 2>&1 rm -f /Software/CentOS/$VERSION/updates/x86_64/repodata/repomd.xml >/dev/null 2>&1 wget -nH --cache=off --cut-dirs=4 -m -c -R gif,png,^index.html* -I ^/centos/$VERSION/updates/i386/ -P /Software/CentOS/$VERSION/updates/i386 http://mirror.centos.org/centos/$VERSION/updates/i386/ wget -nH --cache=off --cut-dirs=4 -m -c -R gif,png,^index.html* -I ^/centos/$VERSION/updates/x86_64/ -P /Software/CentOS/$VERSION/updates/x86_64 http://mirror.centos.org/centos/$VERSION/updates/x86_64/ -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.
Kai Schaetzl <maillists at conactive.com> wrote: I figured I try if I can mirror the base and updates repos locally. There's no tutorial for that, only one about creating your own repo of packages which is not the same. So, I just mirrored all the stuff with wget and changed the baseurl in the repo files and hoped that's enough. Works. So easy you don't need a tutorial. Kai, I only have a comment about the base mirror. Instead of using the internet to make a base mirror (not sure you did it that way), you can use the CentOS-Media.repo This works best if you have the DVD ISO #mkdir /mnt/C564 #nano /etc/fstab ----------- add at end ---------------- /path-to/CentOS-5.0-x86_64-bin-DVD.iso /mnt/C564 iso9660 ro,loop,async 0 0 --------------- unsnip ------------- now edit /etc/yum.repos.d/CentOS-Media.repo and add to [c5-media] file:///mnt/C564 then you want YUM to ignore the [base] repo and use [c5-media] #yum search some-rpm --disablerepo=base --enablerepo=c5-media now you have speed and still have all the default abilities of YUM to find the RPM owner of [c5-media]: [tlviewer at hercules ~]$ rpm -qf /etc/yum.repos.d/CentOS-Media.repo centos-release-5-0.0.el5.centos.2 My repo for C5 (mpryor-c5.repo) at http://www.tlviewer.org/centos -- Mark --------------------------------- Check out the hottest 2008 models today at Yahoo! Autos. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20071010/ad8bed3c/attachment-0004.html>
Kai Schaetzl wrote:> *But* I then realized that the updates directory contains *all* updates, > not just the latest. Which means if I don't regularly check I may get old > versions mirrored I don't want. It also means that I get a lot of unwanted > files at the time I start to mirror. And I cannot delete old files as > these would again be mirrored in. > An obvious solution would be to check each day and tell wget (or whatever > software I use) to ignore files older than 24 hours. Still, this means the > initial download has to get them all and I have to delete all unwanted old > files manually. > Is there a better solution?Use rsync. I keep a local copy of the updates, specific to my platform. I'm also very specific in WHAT I want locally as you'll see in the following script. I use the Stanford University's mirror. :~> cat rsync.sh echo "Getting Centos 5.0 Updates..."; echo -e "*****************************\n"; rsync --progress --archive \ --partial --delete --delete-excluded \ --exclude centosplus/ \ --exclude fasttrack/ \ --exclude isos/ \ --exclude isos-dvd/ \ --exclude os/ \ --exclude updates/SRPMS/ \ --exclude updates/x86_64/ \ --exclude addons/SRPMS/ \ --exclude addons/x86_64/ \ --exclude extras/SRPMS/ \ --exclude extras/x86_64/ \ mirror.stanford.edu::mirrors/centos/5.0 /home/CentOS/; -- W | It's not a bug - it's an undocumented feature. +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:ashley at pcraft.com> . 303.442.6410 x130 IT Director / SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Imaging . 3550 Arapahoe Ave. #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
Kai Schaetzl ha scritto:> I figured I try if I can mirror the base and updates repos locally. > There's no tutorial for that, only one about creating your own repo of > packages which is not the same. So, I just mirrored all the stuff with > wget and changed the baseurl in the repo files and hoped that's enough. > Works. So easy you don't need a tutorial. > *But* I then realized that the updates directory contains *all* updates, > not just the latest. Which means if I don't regularly check I may get old > versions mirrored I don't want. It also means that I get a lot of unwanted > files at the time I start to mirror. And I cannot delete old files as > these would again be mirrored in. > An obvious solution would be to check each day and tell wget (or whatever > software I use) to ignore files older than 24 hours. Still, this means the > initial download has to get them all and I have to delete all unwanted old > files manually. > Is there a better solution? > > Kai >Have you tried mrepo? Regards Lorenzo Quatrini
Mark pryor wrote on Wed, 10 Oct 2007 13:30:46 -0700 (PDT):> I only have a comment about the base mirror. Instead of using the internet tomake a base mirror (not sure you did it that way), you can use the CentOS-Media.repo Ah, well, I remember having read about this, but admit I didn't think about it. In my case it wouldn't be usable, though. I want to setup several VMs and several physical machines and thought it would be stupid to update them all from a remote mirror. I set up the base repo by just copying the relevant stuff from the DVD to the harddisk of my Win2k3 server and then retrieved updates via wget from a mirror in Germany. Now I can install the VMs from my local mirror via FTP (installing from http won't work, don't know why) and update them via yum (using HTTP, it seems FTP doesn't work with yum) from the local mirror. The physical machines get a DVD drive attached, get a minimal install, DVD drive removed and then I can also update and add from the local mirror. Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com