I had to do a hardware refresh this weekend and needed to match the binaries from the original host to the new target host version for version and found that the following two lines of CLI did 90% of the work for me. It was to good not to share. This was tested going from a default 5.8 install to a 5.10 install with the full Oracle DB dependencies stack. Preqrequitsts would be that both the source and target host use the same RPM repos. The only clean up step besides restarting was verifying the right kernel was selected as default in /etc/grub.conf
Produced a formatted list of installed RPMs of Source System
rpm -qa --qf="%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" |sort >> /root/source_hosts_installed_rpms.txt
Transfer the file from the Source System to the Target System
scp /root/source_hosts_installed_rpms.txt root@target:/root
Install List of RPMS from File on Target System
yum -y install $(cat /root/source_hosts_installed_rpms.txt)
Transaction Summary
Install 54 Package(s) Upgrade 257 Package(s) Total download size: 647 M
[link][9 comments]