I want to be able to cache yum updates locally so when I build machines via kickstart I can have them update more quickly from a local server. I can't seem to recall how to do this using wget, and googling hasn't turned anything up yet. Does anyone know of some page that describes how to do this? Thx.
- Joe
On Mon, Oct 30, 2006 at 09:54:00AM -0500, Joe Tseng wrote:
I want to be able to cache yum updates locally so when I build machines via kickstart I can have them update more quickly from a local server. I can't seem to recall how to do this using wget, and googling hasn't turned anything up yet.
Set up squid and add proxy=http://your.squid.box:3128/ to your /etc/yum.conf on all hosts? Also, tweak /etc/yum.repos.d/ so that you don't use mirrorlist, but one particular mirror.
Jakub
Jakub Jelinek wrote:
On Mon, Oct 30, 2006 at 09:54:00AM -0500, Joe Tseng wrote:
I want to be able to cache yum updates locally so when I build machines via kickstart I can have them update more quickly from a local server. I can't seem to recall how to do this using wget, and googling hasn't turned anything up yet.
Set up squid and add proxy=http://your.squid.box:3128/ to your /etc/yum.conf on all hosts? Also, tweak /etc/yum.repos.d/ so that you don't use mirrorlist, but one particular mirror.
Jakub
The original poster said during 'build' with kickstart and that is a problem. The installer has a brand new step to allow additional repo. specification during the install. (Extras configured by default in this way). In kickstart the keyword for specifying the additional repository is 'repo --name=xx ...' However, if you are behind a network proxy, and Im guessing most people that build muitiple machines from kickstart are, there's another problem as currently there is no direct way to set a proxy during the install. Also note that when using kickstart, AFAICT the FC6 Extras built-in repo stays on by default trying to access the web directly, hanging the install.
I'm using squid as an accelerator to try and work around this.
Mark
Joe Tseng wrote:
I want to be able to cache yum updates locally so when I build machines via kickstart I can have them update more quickly from a local server. I can't seem to recall how to do this using wget, and googling hasn't turned anything up yet. Does anyone know of some page that describes how to do this? Thx.
- Joe
See:
"Joe Tseng" wrote:
I want to be able to cache yum updates locally so when I build machines via kickstart I can have them update more quickly from a local server. I can't seem to recall how to do this using wget, and googling hasn't turned anything up yet. Does anyone know of some page that describes how to do this? Thx.
I had this same problem 6 months ago when fc5 was released. I wanted to create a local repo containing just the updates and extras I needed. As far as I could determine then, using such "partial" repositories was not possible without patching yum. The order in which yum tries different repositories is not controllable and essentially random, so that even if one has a repo with a needed rpm sitting on the same disk, yum is still likely to download it from the internet.
I submitted a pretty trivial patch to the developers to fix this but it was rejected with the comment that such functionality should be provided via a plugin. Unfortunate that there seems to be no plugin hook at the place in yum where the repo ordering needs to be done. And I guess if you are using kickstart, a yum patch wouldn't help you.
My sense is the yum people don't really care that much about people with slow/no internet connections (or there would be a means of installing from CD already.) But its free software so not much point complaining.
I do think it is wrong of fc5 docs to say at install time (IIRC) that you need not install everything now because you can easily install additional software later. This is only true if you have a fast/good internet connection, There should be a warning to this effect. (Maybe there is in fc6, haven't installed it yet.)
On Mon, 30 Oct 2006, Joe Tseng wrote:
I want to be able to cache yum updates locally so when I build machines via kickstart I can have them update more quickly from a local server. I can't seem to recall how to do this using wget, and googling hasn't turned anything up yet. Does anyone know of some page that describes how to do this? Thx.
My personal hack is set yum to cache (add 'keepcache=1' in /etc/yum.conf) before updating the first machine I build on a new distro. Then when I build the second or later machines I tarball up /var/cache/yum and drop it into the new machine before starting the first update. It isn't pretty, but as long you are working inside a single architecture it works like a champ.
Today Benjamin Franz did spake thusly:
On Mon, 30 Oct 2006, Joe Tseng wrote:
I want to be able to cache yum updates locally so when I build machines via kickstart I can have them update more quickly from a local server. I can't seem to recall how to do this using wget, and googling hasn't turned anything up yet. Does anyone know of some page that describes how to do this? Thx.
My personal hack is set yum to cache (add 'keepcache=1' in /etc/yum.conf) before updating the first machine I build on a new distro. Then when I build the second or later machines I tarball up /var/cache/yum and drop it into the new machine before starting the first update. It isn't pretty, but as long you are working inside a single architecture it works like a champ.
Could you not set up squid on the gateway and then set yum to use a proxy?
Scott van Looy schrieb:
Today Benjamin Franz did spake thusly:
On Mon, 30 Oct 2006, Joe Tseng wrote:
I want to be able to cache yum updates locally so when I build machines via kickstart I can have them update more quickly from a local server. I can't seem to recall how to do this using wget, and googling hasn't turned anything up yet. Does anyone know of some page that describes how to do this? Thx.
My personal hack is set yum to cache (add 'keepcache=1' in /etc/yum.conf) before updating the first machine I build on a new distro. Then when I build the second or later machines I tarball up /var/cache/yum and drop it into the new machine before starting the first update. It isn't pretty, but as long you are working inside a single architecture it works like a champ.
Could you not set up squid on the gateway and then set yum to use a proxy?
take apache or vs_ftp and build an local mirror of the update Server. Then add an additional repo file.