UNIX / Linux command-line interface.

Upgrading Red Hat Enterprise Linux / CentOS

RHEL/CentOS 5–6–7 Changes

You encounter enormous changes when you change to the next major version of Red Hat's Enterprise Linux product suite. Here are my notes on what changes when you upgrade from one major release of Red Hat Enterprise Linux (or its clone CentOS). In other words, how to upgrade from RHEL (or CentOS) 5 to 6 to 7. The major releases of RHEL appear further and further apart in time, meaning that the changes are more and more complicated.

Remember that it's not as if Red Hat is changing all of these things. Their installer and their graphical configuration tools, sure, those are Red Hat changes. But much of this is the result of the many underlying projects changing. So this collection of pages also applies to Scientific Linux and Oracle Linux, where the major release numbers 5, 6, 7 align with RHEL and CentOS, and really to any distribution as its components have updated over the past few years.

RHEL 2.1 26 March 2002
RHEL 3 22 October 2003
RHEL 4 15 February 2005
RHEL 5 14 March 2007
RHEL 6 10 November 2010
RHEL 7 10 June 2014

1 — Installation and Exploring the Newly Installed System

The order of events and the logic of the installation completely change with every major release.

It was impossible to do a 5–6 upgrade, but 6–7 should be possible. However, a fresh re-install will have many advantages over upgrading in place.

X improves from one version to the next. With RHEL 5 you have just whatever was auto-detected during the installation, probably 800×600. RHEL 6 should be close to full screen size, RHEL 7 should be full screen size.

Once you get it installed, the configuration of Gnome within RHEL hides the terminal emulator in ever more inconvenient corners of the menus. Gnome 3 supports using the Windows Start Key to bring up a "run this command" text box that allows searching. It can be confusing, you can bring up a command by a search for something that isn't really the command's name. This left me confused as to why I could start the firewall administration tool by typing firewall at text box, which is really searching on some metadata, but I couldn't run a firewall command.

I thought it was just me being naïve, but I have discovered that many other serious Linux system administrators don't know what the "Windows Start Key" is. If your keyboard has a key with the Microsoft logo on it, down around the left-hand Shift and Alt and Control keys, it's that thing.

The default user PATH environment variable changes:

No sbin components, so remember to always add "-" or "-l" or "--login" to your use su command so your following system administration commands work!

What an odd beginning! There are 12 programs there. Stranger yet, /usr/lib64/qt4/bin exists with 35 programs, 7 of which have the same names as those under qt-3.3. The newer version is not in the user's path. I don't know what's going on here...

It's strange that /bin and /sbin are included, as they are links to /usr/bin and /usr/sbin, respectively. And I don't know who would use ~/.local/bin to house their personal programs.

The manual page indices always need to be rebuilt so man -k will work after the installation. There will be a cron job to do that, or you can do it manually. This used the makewhatis utility for ages, but with RHEL 7 mandb replaces makewhatis. The file /etc/cron.daily/man-db.cron makes this happen every night.

When you upgrade from RHEL 5 to 6, you will notice that the network configuration has become rather complicated. See the IP networking section later for what's behind this. Among other things, be careful to de-select Require addressing for this connection to complete for IPv4 and also IPv6 if you use it. You get more choices about storage starting with RHEL 6, some of it a bit exotic for typical users. If you customize the package selection, watch out! It is very tempting to click the Next button prematurely. That immediately starts an installation process, and the only way to abort it is to reset or power-cycle the machine and start over.

When you upgrade from 6 to 7, it becomes more complicated yet. The graphical configuration tool for networking now includes tabs for 802.1x security and higher performance data center type LAN technology.

The distribution had grown to the point that RHEL 6 no longer fit onto one single-layer DVD. DVD1 is the main installation media, it's 4.0 GB for the RHEL 6 workstation and the single CentOS image. DVD2 is the "optional" media, it's just 1.2 GB. DVD2 for the most part contains the -doc and -devel packages, but it also contains some of the intranet/LAN server packages. For example, samba-swat and lpd-cups.

RHEL 5 gave you a choice about using SELinux and the iptables and ip6tables firewall rules. RHEL 6 and later force these on you, preconfigured and enabled.

The firstboot program that runs on the first post-installation graphical boot starting with RHEL 6 insists that you create a user. However, the user creation tool is poorly designed and it does not let you fully control all the attributes of this user. Workaround: Create a dummy user to make it happy, create your real users, and then delete the dummy user.

If you're using VMware, Red Hat has included drivers that give you the benefits of VMware's VMtools, such as the ability to simply move the mouse out of the VM window without first pressing <Ctrl><Alt>. Do not install VMtools, as that can make things worse instead of better. My experience was that VMtools took away my control of the display settings and recreated the mouse and keyboard focus problem. Just install RHEL or CentOS and enjoy.

Release Default Optional
RHEL 5 Gnome 2.16 KDE 3.5
RHEL 6 Gnome 2.28 KDE 4.3
RHEL 7 Gnome 3.8 KDE 4.10

The desktop graphical user interface goes through major changes, especially going from RHEL 6 to 7. Both the default Gnome and the optional KDE graphical interface go through major version changes.

Gnome 3.8 is surprisingly resource-hungry. You will probably want to put autospawn = no in your ~/.pulse/client.conf file and also in /etc/skel. Otherwise pulseaudio will always run and always restart, and sometimes it will impose a surprising load on the CPU.

By RHEL 7 many more packages had moved to having one main configuration file plus a collection, like what xinetd has done for some time. For example, sudo puts its system-wide settings in /etc/sudoers and then reads all the user-specific files /etc/sudoers.d/*. Rsyslog reads /etc/rsyslog.conf and then all the files in /etc/rsyslog.d/*.

This isn't anything specific to Red Hat, it is a Linux-wide trend that became common between the releases of RHEL 6 and 7. This is also similar to the shells that for some time now first use /etc/profile and then /etc/profile.d/*, followed by ~/.profile.

This is good, take advantage of it. The intent is that you don't touch the distribution-provided file /etc/*.conf. When the package updates, rpm discovers that the main configuration file is still in pristine form and you have no confusing *.rpmnew, *.rpmold, and so on to track down and manually merge changes. Let the distribution's provided configuration file do whatever they intended, and their your locally created files can "correct" any system-wide settings you want to change.

With RHEL 7 there is a significant difference between running vi and vim. Many distributions, including earlier RHEL, really ran vim, the improved version with more capabilities, when you typed just vi. (this was through some trickery with /etc/alternatives).

vim is your friend, it really helps by coloring the syntax in configuration files, programming languages, HTML, and much more. I had the benefit of being in the habit of always typing vim so I got the better one on non-Linux OSes like OpenBSD and Solaris. Adopt my habit!