Frank Cox
2016-May-18 16:56 UTC
[CentOS] one-shot yum command to match rpms between systems?
On Wed, 18 May 2016 09:30:54 +0100 James Hogarth wrote:> And of course as will be pointed out by many the only right answer is yum > update anyway given cherry picking updates is not supported.The objective is not to cherry pick updates, but rather to install a second system with packages that match the first system. After fine-tuning the installed packages and stripping out the unnecessary stuff, it would be nice to just say "make that system look like this one" -- rsync for yum if you will. The specific package versions aren't important at that stage since I can run yum update after the initial installation. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
James Hogarth
2016-May-18 17:17 UTC
[CentOS] one-shot yum command to match rpms between systems?
On 18 May 2016 17:57, "Frank Cox" <theatre at melvilletheatre.com> wrote:> > On Wed, 18 May 2016 09:30:54 +0100 > James Hogarth wrote: > > > And of course as will be pointed out by many the only right answer isyum> > update anyway given cherry picking updates is not supported. > > The objective is not to cherry pick updates, but rather to install asecond system with packages that match the first system. After fine-tuning the installed packages and stripping out the unnecessary stuff, it would be nice to just say "make that system look like this one" -- rsync for yum if you will. The specific package versions aren't important at that stage since I can run yum update after the initial installation.>Well if you're planning on doing a yum update anyway just cat rpmlist | xargs yum -y install Better solution to this though is a basic ansible task list defining what you need.
Frank Cox
2016-May-18 17:37 UTC
[CentOS] one-shot yum command to match rpms between systems?
On Wed, 18 May 2016 18:17:10 +0100 James Hogarth wrote:> Well if you're planning on doing a yum update anyway just cat rpmlist | > xargs yum -y installThat wouldn't remove the unneeded packages on the second system. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
m.roth at 5-cent.us
2016-May-18 18:55 UTC
[CentOS] one-shot yum command to match rpms between systems?
Frank Cox wrote:> On Wed, 18 May 2016 09:30:54 +0100 > James Hogarth wrote: > >> And of course as will be pointed out by many the only right answer is >> yum >> update anyway given cherry picking updates is not supported. > > The objective is not to cherry pick updates, but rather to install a > second system with packages that match the first system. After > fine-tuning the installed packages and stripping out the unnecessary > stuff, it would be nice to just say "make that system look like this one" > -- rsync for yum if you will. The specific package versions aren't > important at that stage since I can run yum update after the initial > installation. >Two solutions, both of which we use here at work. 1. rpm -qa > file; minimal on new machine, and yum -y install $(cat file). 2. a) on new machine, mkdir /new /boot/new b) from old machine, sync -HPavzx --exclude=/old --exclude=/var/log/wtmp --exclude=/var/log/lastlog $newmachine:/. /new/. rsync -HPavzx $machine:/boot/. /boot/new/. c) then: rsync -HPavzx /etc/sysconfig/network-scripts/ifcfg-eth* /new/etc/sysconfig/network-scripts rsync -HPavzx /etc/sysconfig/hwconf /new/etc/sysconfig rsync -HPavzx /boot/grub/device.map /boot/new/grub/ rsync -HPavzx /etc/udev/rules.d/70-persistent-net.rules /new/etc/udev/rules.d/ rsync -HPavzx /etc/ssh/ssh_host* /new/etc/ssh d) zsh zmodload zsh/files cd /boot mkdir old mv * old mv old/lost+found . mv old/new/* . # Root partition. cd / mkdir old mv * old mv old/lost+found . mv old/root mv old/new/* . sync sync And reboot. mark