SCIENTIFIC-LINUX-USERS Archives

March 2006

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Troy Dawson <[log in to unmask]>
Reply To:
Troy Dawson <[log in to unmask]>
Date:
Thu, 23 Mar 2006 11:28:29 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (70 lines)
Ken Teh wrote:
> Is it possible to set up a local yum repository for add-on software?  Do 
> you have recipes for doing this that I could read?
> 
> I'm putting a cluster of machines together.  I have to install additional
> software.  At present, I do this via a common NFS mount which is fine.  The
> amount of work required to keep this up-to-date would be the same as 
> keeping
> a yum repo up-todate.  However, this does not work so well for add-ons that
> are sharable libraries.  Here it seems more appropriate to install the
> library rpm and have yum handle any updates.
> 
> So, the question is: Is it possible to set up a partial yum repo?  I
> have in mind something along the lines of the sl-contrib repo.  I'd fill 
> the
> repo with updated rpms and let yum do the work.
> 
> Thanks!  Ken

Hi Ken,
It's very possible, and quite easy ... at least I think so.

For some odd reason I felt it easier to explain in html format that in 
normal text, so I wrote it into the FAQ.
https://www.scientificlinux.org/documentation/faq/technical1


But if I do a cut and paste, here's what it looks like.

    1. On the NFS server, create a directory where you want everything 
For this example we'll call use /export/localrepo
    2. On the NFS server, make sure createrepo is installed
       yum install createrepo
    3. On the NFS server, copy all your rpm's into that directory.
       It actually can be in a directory within that directory. They can 
also be link's, but those links have to be visible to the clients when 
it's nfs mounted, so sometime's it's easier to just do the regular 
stuff, and dump everything into the directory.
    4. On the NFS server, create the yum headers for that directory
       (For S.L. 3.0.x clients) yum-arch -l /export/localrepo
       (For S.L. 4.x clients) createrepo /export/localrepo
    5. Everything is now setup on the server On the client, mount the 
nfs directory, for our example, we'll say we are mounting on /mnt/repo
       mount myserver:/export/localrepo /mnt/repo
    6. On the clients, put this local repo into your yum configuration
           * S.L. 3.0.x - put the following on the end of /etc/yum.conf

[localrepo]
name=local repo
baseurl=file:///mnt/repo/

           * S.L. 4.x - create the file /etc/yum.repos.d/local.repo that 
looks like

[localrepo]
name=local repo
baseurl=file:///mnt/repo/
enabled=1

    7. On the clients, just use yum as normal
       yum update, yum list, yum install ...



-- 
__________________________________________________
Troy Dawson  [log in to unmask]  (630)840-6468
Fermilab  ComputingDivision/CSS  CSI Group
__________________________________________________

ATOM RSS1 RSS2