[Yum] setting up a repository
Robert G. Brown
rgb at phy.duke.edu
Fri Dec 19 11:56:02 UTC 2003
On Fri, 19 Dec 2003, TheFinn wrote:
> How do I set up a local disk repository of my rpm's ?
> I currently have an nfs mount for all the rpms from the redhat9 disks. I'd
> like it to install local files when possible.
An NFS mount is actually a really good idea in terms of conserving disk
space, although with disk costing less than $1/GB I suppose it doesn't
matter much anymore.
Any of several ways. I'd suggest rsync or plain old cp from the NFS
mount. There is also an extension of yum that can be used to mirror
repositories. Basically, a repository is a directory branch containing
RPMS anywhere in its included paths down to 5 (? I'm remembering and
could be wrong) layers deep on which yum-arch is run. E.g.
cp -r /nfs/export/yum_repository_original /local/yum_repository
will do it. Then just add an appropriate repository section to your
local /etc/yum.conf to point to it.
Note that cp is not the best tool in the long run because it won't work
correctly twice and because it works much harder than it needs to.
rsync can be used to MIRROR the NFS repository regularly in a nightly
cron, gleaning only the changed rpm's.
Once again, though, I have to point out that for most purposes this is a
pointless exercise. yum ALREADY automagically copies rpm's from the
remote/nfs repository to a local "repository" (cache directory) on
demand, it ALREADY gets 'em only if it needs 'em, it is ALREADY
optimally efficient in this regard, and finally, you have to do all this
on every system on which you want a local copy. Adding a local mirror
makes sense only if it is for some other reason.
Adding an ADDITIONAL local repository for your OWN local rpm's DOES make
sense and is easy to do. Just create a directory, drop your rpm's in
it, run yum-arch, add a repository section to yum.conf, and (if you want
its RPM's to take precedence over those found in the NFS/primary
repository) adjust your package update policy to suit. The man pages
See the yum article and almost finished yum HOWTO on:
> Also, is there a good list of rpm repositories for other packages apart from
> the normal ones ??
I don't know what you mean by this. What other packages? What normal
ones? There is a list of yum repositories posted on the yum site on
linux.duke.edu. There are MANY rpm resources on rpmfind. There are the
primary distro sites and their mirrors (many yummified at this point).
Is that what you are asking?
> Yum mailing list
> Yum at lists.dulug.duke.edu
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:rgb at phy.duke.edu
More information about the Yum