The question was asked in IRC today:
hello folks, is there any way to install packages from a list written by yum list installed? I've two CentOS 6.3 hosts and I like to get them with the same packages installed (also versions)
Here is a quick (and accurate) answer:
- Take and test backups to taste
- Run:
rpm -qa --qf '%{name} \n' | sort > MANIFEST
Note: that is a backslash n -- the html markup makes it hard to see the distinction - Then copy that MANIFEST to the second unit and run:
yum -y install `cat MANIFEST`
Note: and here, backtick around the cat to get a sub-shell - Finish by running:
yum -y update
on each unit
For extra credit, re-run the MANIFEST creator on each unit, and use diff to find any variances