Re: Can yum be used to update a directory instead of the running system?

Posted by pschaff on 2012/3/1 21:30:20
Seem to me that you are not quite grasping the nature of the problem and the feasibility of potential solutions. The easiest (and perhaps the only) way to make sure you cover all the bases is to create and maintain a mirror of all CentOS repos you use - as a minimum probably base, updates, and extras. Anything else is going to be a maintenance nightmare, or just plain impossible. There is no way (that I know of) to anticipate what updates any particular system will need in advance. You need to run "yum update" against the current metadata. You also cannot anticipate what additional packages might need to be installed on any particular system. Creating a full local mirror of the repos you need is the only way I can suggest to work the problem you have laid out for non-uniform systems. You can sync the repos over the network with rsync, using systems that do have Internet access, or use an external hard disk, or a USB stick with sufficient capacity to hold the repos.

For an idea of the space requirements:
[build@lynx ~]$ cd /share/CentOS/5.7
[build@lynx 5.7]$ ll
total 44
drwxrwxr-x. 5 build build 4096 May 14  2010 addons
drwxrwxr-x. 5 build build 4096 Nov 30 04:59 centosplus
drwxrwxr-x. 5 build build 4096 May 14  2010 contrib
drwxrwxr-x. 5 build build 4096 Sep 12 20:59 cr
drwxrwxr-x. 5 build build 4096 Feb  8 13:47 extras
drwxrwxr-x. 5 build build 4096 Dec  6 20:41 fasttrack
drwxrwxr-x. 4 build build 4096 Sep  8 11:41 isos
drwxrwxr-x. 8 build build 4096 Dec 10 15:18 local
drwxrwxr-x. 6 build build 4096 Feb 11 09:22 localtest
drwxrwxr-x. 5 build build 4096 Sep  8 11:41 os
drwxrwxr-x. 5 build build 4096 Sep  8 12:48 updates
[build@lynx 5.7]$ du -sh os/i386 extras/i386 updates/i386
4.0G	os/i386
146M	extras/i386
1.7G	updates/i386
[build@lynx 5.7]$ !!:gs/i386/x86_64/
du -sh os/x86_64 extras/x86_64 updates/x86_64
4.7G	os/x86_64
168M	extras/x86_64
1.9G	updates/x86_64
[build@lynx 5.7]$ du -sh .
31G	.
[build@lynx 5.7]$ du -sh *
84K	addons
1.5G	centosplus
36K	contrib
44K	cr
499M	extras
233M	fasttrack
18G	isos
313M	local
213M	localtest
7.3G	os
3.6G	updates
Note that local and localtest are my own repos and not part of the standard structure. For just os, updates, and extras, an 8GB USB stick for each architecture would be adequate, or 16GB for both, and you could still have a bit of room for other things like fasttrack and centosplus.

This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=38&topic_id=36103&post_id=156376