Thursday, May 26, 2011

Quick way to keep servers similar with the same packages.

Here is a quick and dirty way to keep RHEL servers updated with the same packages that are installed with yum.

Use the following command to create a text file with the packages installed.
rpm -qa > packagelist

Then you can copy the file packagelist to your new server. Run the following command to do a yum install of all the packages that are in the packagelist file

yum -y install $(cat /pathto/packagelist)

That should get and install all the same packages to the other server.

0 comments:

Post a Comment