yum/apt cache proxy?

Red Squirrel

No Lifer
May 24, 2003
70,648
13,823
126
www.anyf.ca
Is there a way to setup a cache server for yum repositories? So I would set to that server, then that server fetches online if it has to, otherwise it takes locally. This way I can archive stuff offline as I need it, automaticly. Is this doable? Could I just use a squid proxy and set the cache to unlimited?

I posted a similar thread but this is a bit different as I want to centralize it on a local server rather then manually move packages around, if possible.

I just like having all my installers locally so next time I need them it's guarantee it's the same one that worked before, or if the author pulls it off then I still have it.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Running Debian mirrors is rather simple, they have how-tos on their site on how to set it up. I'd imagine the steps are the same for Ubuntu, just change where you source your package lists.
 

Red Squirrel

No Lifer
May 24, 2003
70,648
13,823
126
www.anyf.ca
Yeah I've thought of mirroring the entire thing too, but how much TB of data are we talking about here? Anyone do it? Just wondering if it's worth it or not for only a few machines. Though I still like having my installers archived somewhere in case they get pulled out of the regular repositories. Is this something common in the Linux world? I know it happens a lot in Windows world, where the author just decides to pull off a program and you can't get it anymore.
 

Red Squirrel

No Lifer
May 24, 2003
70,648
13,823
126
www.anyf.ca
ok trying to keep a particular package (Mono) but it has a bunch of dependancies.

I thought stuff from yum went in /var/cache/yum but I don't see any files going in there. I also made sure to edit /etc/yum.conf and set keepcache=1. Is there anything else I need to do?

Rather then mirroring repositories I decided I'll just grab the files from the cache everytime I install something I want to keep, will that even work, or are they in some odd format that can't be installed directly?

 

heymrdj

Diamond Member
May 28, 2007
3,999
63
91
Sorry, i hadn't subscribed to this thread. The mirrors aren't heavy, mine were just about 50GB to do both Debian and Ubuntu, but that was just limiting it to the 64bit packages. I imagine it could hit just high of a TB if u had every package in every format...
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
I'm actually building a mirror this week for my company. We have set aside 300 gig of storage. We expect to use about 75.