Home > Uncategorized > Updating CentOS – the right way

Updating CentOS – the right way

April 15th, 2009

I’ve always had trouble understanding exactly why I would get a million .rpmnew files after updating my servers, especially when those files were exactly identical to their original counterparts. Luckily there seems to be a solution – the yum-merge-conf plugin!

I updated my CentOS 5.2 to 5.3 by running yum --merge-conf, and after downloading and updating, yum asked me what it should do about the new configuration files – kindly sparing me the identical ones:


Config files ‘/etc/ld.so.conf’ and ‘/etc/ld.so.conf.rpmnew’ are identical, I’m removing the duplicate one
Config files ‘/etc/nsswitch.conf’ and ‘/etc/nsswitch.conf.rpmnew’ are identical, I’m removing the duplicate one
Config files ‘/etc/krb5.conf’ and ‘/etc/krb5.conf.rpmnew’ are identical, I’m removing the duplicate one
Config files ‘/etc/libaudit.conf’ and ‘/etc/libaudit.conf.rpmnew’ are identical, I’m removing the duplicate one

Package sudo: merging configuration for file “/etc/sudoers”:
By default, RPM would keep your local version and rename the new one to /etc/sudoers.rpmnew
What do you want to do ?
– diff the two versions (d)
– do the default RPM action (q)
– install the package’s version (i)
– merge interactively with vim (v)
– background this process and examine manually (z)
Your answer ?

I chose install the package’s version for everything I know I didn’t mess with, and do the default RPM action (keep local version) for the ones I had been tweaking.

Now, isn’t that cool?

Uncategorized , , ,

  1. No comments yet.
  1. No trackbacks yet.
Mail