Comparing OS configuration of two RHEL servers

It's not completely comprehensive, but rpm can provide a good start. You can get the list of installed packages:

rpm -qa > pkgs.txt

Using standard UNIX tools such as wc and cmp, you can tell which packages are / are not on the two machines.

After that, you can use the --verify option to see if any of the configuration files are different:

rpm --verify cat pkgs.txt

See the rpm man page for information on the information reported by the --verify flag.


The best way is a centralized solution because "the OS configuration" doesn't exist. Linux doesn't know a registry so the config is spread all over the file system. That makes it pretty hard to do what you want.

That said, you can simply copy the directory /etc of all servers into one place and then compare them with diff -uNr

That should give you 90% of the config but you will also get lots of false negatives.


Mount the OS root partitions in /mnt/osA and /mnt/osB

diff -rq /mnt/osA /mnt/osB would give you some output similar to Solaris' lucompare

You could then diff the more concerning files closely, like sysctl.conf, httpd.conf, etc.

And how could I forget Blueprint! With Blueprint you can run against a system and get a recipe of what has changed from the default install.