[nzlug] Using yum from local repos
Patrick Connolly
tuxkid at ihug.co.nz
Mon Nov 20 19:48:55 NZDT 2006
Somewhere about Mon, 20-Nov-2006 at 10:38AM +1300 (give or take), Morgan Read wrote:
|> Patrick Connolly wrote:
|> > I'm trying to add to the installation of FC6 from the rpms I copied
|> > from the CDs to hard disk. Following some advice I found on a Redhat
|> > site (can't find it now), I modified /etc/yum.repos.d/fedora-core.repo
|> > so that the baseurl points to that directory instead of
|> > fedoraproject.org/blah/de/blah....
|>
|> Any reason not to use the rpms directly from the CD's? The install
There's 6 of them (CD's) and it would get complicated if one of the
dependencies is on a different CD from the one in the drive.
I want yum to sort out the dependencies, so I'd like to get it
organised "properly".
|> CD/DVD's are now more or less simply yum repos, so there's no need
|> to do any additional repo setup. This is what I've got in
|> /etc/yum.conf (I keep all my customisations in
|> /etc/yum.conf and then just comment out corresponding entries in /etc/yum.repos.d/):
|> [install-dvd]
|> name=Local Fedora Install DVD
|> baseurl=file:///media/disk/
|> gpgkey=file:///media/disk/RPM-GPG-KEY-fedora file:///media/disk/RPM-GPG-KEY
|> gpgcheck=1
|> enabled=0
|>
|> If it's enabled by default and the cd/dvd isn't mounted it just fails over and
|> continues with the other repos as configured - though yumex seems to get stuck
|> on this.
|>
|> To create a repo from any directory run createrepo on that directory. So, for
|> instance, I have a local repo at /usr/local/repo/ and from that directory I run
|> "# createrepo -p ." which creates a repodata directory in that directory - it
createrepo is what I needed to know about. Thanks for that. There's
rather a lot I wanted to install, so yum should now work as it's designed.
|> doesn't matter if the rpms are in sub-directories. The corresponding entry in
|> my /etc/yum.conf:
|> [local]
|> name=Local Packages
|> baseurl=file:///usr/local/repo/
|> gpgcheck=0
|> enabled=0
|>
|> HTH,
Yes, that's very helpful.
--
___ Patrick Connolly
{~._.~}
_( Y )_ Good judgment comes from experience
(:_~*~_:) Experience comes from bad judgment
(_)-(_)
More information about the NZLUG
mailing list