Upgrading from CentOS 7.3 to 7.4#
Last month CentOS 7.4 was announced and it was time to rebuild some servers from scratch to make sure all playbooks were still correct as it is always good to know you can quickly (re)build servers when needed. For some other servers, the impact would be big due to huge amounts of data that needed to be moved around and an in-place upgrade would be sufficient.
Upgrading is very straightforward as it the same as the update option with “-obsoletes” flag set which removes obsolete packages. So let start with CentOS 7.3.
$ cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
First, make sure all cached data is purged so we get the latest information. Secondly, run yum upgrade to download all required packages and install them. And thirdly, reboot your system.
$ sudo yum clean all
$ sudo yum upgrade
$ sudo systemctl reboot
When logging back into the system it presents itself as a server running CentOS 7.4.
$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
A side note to this procedure is not to use it on a server that has running applications and/or has users connecting to it. They may experience errors/failures during the upgrade procedure as libraries may not match what an application expects to start correctly or an essential service that is not running during the upgrade.