Re: Managing fedora installations behind firewall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 23, 2011 at 8:51 AM, Timothy Murphy <gayleard@xxxxxxxxxx> wrote:
> Richard Shaw wrote:
>
>> I setup a "local" repo on my desktop computer that I copied all of the
>> DVD provided packages (and some others I've build myself) to. I don't
>> worry about making the other computers on my home network ONLY use my
>> local repo so I just add a repo config file pointing to my packages
>> (over NFS) and give it a lower "cost" which means if a package is
>> available on both my local repo and in the fedora repos then it will
>> install from my local repo.
>
> This sounds interesting.
> How exactly do you do it?
> Is it all in /etc/yum.conf ?
> If so, could we see yours, please.

Here's the short version:

1. Copy the packages somewhere, I use "/var/local/packages" as the
root of the repository and then have subdirectories, i.e.:

/var/local/packages/fedora for the DVD packages
/var/local/packages/local/{i686,x86_64,source} for my own packages.***

*** You don't have to separate the packages by the arch since it's one
big repo, I'm just being anal.

2. Run "createrepo" from the package repo root directory

# cd /var/local/packages
# createrepo

3. Setup a repo file (I call mine local.repo) in /etc/yum.repos.d/

[local]
name=Local Packages for $releasever - $basearch
baseurl=file:///var/local/packages/
enabled=1
gpgcheck=0
cost=500

For the "remote" computers I use autofs to the baserul line changes to:

baserul=file:///net/<server>/var/local/packages

But you could use whatever method you want (http, ftp, etc.)

4. When you add packages run "createrepo --update" otherwise it's
going to start from scratch which can take a while with all the DVD
packages. The other option would be to create two separate local
repos, one for the DVD packages which will not change and one for your
packages/updates. This would make "createrepo" faster so you wouldn't
have to use --update.

Other tips and tricks:
If you've recently added packages and you want a particular computer
to update immediately you need to run:

# yum clean expire-cache

Before doing "yum update". Otherwise it may not check the repo for
updates until the cache naturally expires.
This does not delete the metadata (the big repo data download) just
the file list I think, which is usually only a few KB.

HTH,
Richard
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux