How To Update CentOS 8 / RHEL 8

0

ADVERTISEMENT

Update CentOS 8
Update CentOS 8

Though CentOS 8 / RHEL 8 was recently released, there should be some updates waiting for your system as CentOS community / Red Hat very often releases updates for its operating systems.

In some cases, right after the installation of the operating system, you will see updates waiting for the installation.

READ: How To Install CentOS 8

READ: How To Install Red Hat Enterprise Linux 8

This guide helps you how to update CentOS 8 / RHEL 8 system to have the latest updated packages or OS minor release (like CentOS 8.1 / RHEL 8.1) on the system as well as to keep the system secure.

Backup

Before performing the OS update, it is recommended to take a backup of important files to secure location.

Update CentOS 8 / RHEL 8

Check Updates

First, let’s look at what are the updates waiting for your system.

yum check-update

Output:

The following updates are available for my machine.

Last metadata expiration check: 0:00:37 ago on Wed 23 Oct 2019 04:43:10 AM EDT.

bash.x86_64                                                4.4.19-8.el8_0                                          BaseOS
bind-export-libs.x86_64                                    32:9.11.4-17.P2.el8_0.1                                 BaseOS
epel-release.noarch                                        8-6.el8                                                 epel
grub2-common.noarch                                        1:2.02-66.el8_0.1                                       BaseOS
grub2-pc.x86_64                                            1:2.02-66.el8_0.1                                       BaseOS
grub2-pc-modules.noarch                                    1:2.02-66.el8_0.1                                       BaseOS
grub2-tools.x86_64                                         1:2.02-66.el8_0.1                                       BaseOS
grub2-tools-extra.x86_64                                   1:2.02-66.el8_0.1                                       BaseOS
grub2-tools-minimal.x86_64                                 1:2.02-66.el8_0.1                                       BaseOS
initscripts.x86_64                                         10.00.1-1.el8_0.1                                       BaseOS
iptables.x86_64                                            1.8.2-9.el8_0.1                                         BaseOS
iptables-ebtables.x86_64                                   1.8.2-9.el8_0.1                                         BaseOS
iptables-libs.x86_64                                       1.8.2-9.el8_0.1                                         BaseOS

.     .     .
.     .     .

sssd-client.x86_64                                         2.0.0-43.el8_0.3                                        BaseOS
sssd-common.x86_64                                         2.0.0-43.el8_0.3                                        BaseOS
sssd-kcm.x86_64                                            2.0.0-43.el8_0.3                                        BaseOS
sssd-nfs-idmap.x86_64                                      2.0.0-43.el8_0.3                                        BaseOS
systemd.x86_64                                             239-13.el8_0.5                                          BaseOS
systemd-libs.x86_64                                        239-13.el8_0.5                                          BaseOS
systemd-pam.x86_64                                         239-13.el8_0.5                                          BaseOS
systemd-udev.x86_64                                        239-13.el8_0.5                                          BaseOS
Obsoleting Packages
grub2-tools.x86_64                                         1:2.02-66.el8_0.1                                       BaseOS
    grub2-tools.x86_64                                     1:2.02-66.el8                                           @anaconda
grub2-tools-efi.x86_64                                     1:2.02-66.el8_0.1                                       BaseOS
    grub2-tools.x86_64                                     1:2.02-66.el8                                           @anaconda
grub2-tools-extra.x86_64                                   1:2.02-66.el8_0.1                                       BaseOS
    grub2-tools.x86_64                                     1:2.02-66.el8                                           @anaconda
grub2-tools-minimal.x86_64                                 1:2.02-66.el8_0.1                                       BaseOS
    grub2-tools.x86_64                                     1:2.02-66.el8                                           @anaconda

If you are satisfied with the updates, proceed to install the updates on your system.

Update Kernel

As a first task, we will only update the OS kernel package.

Updating kernel separately is an optional one as you can update both kernel and packages in a single command which will see in the next section.
Since CentOS / Red Hat doesn’t follow any scheduled date for releasing updates, you will not get Kernel updates every time.

Use the below command to update the OS kernel.

yum update -y kernel
Update Kernel
Update Kernel

Update Packages

Now, install the remaining updates for your system related to already installed applications.

yum update

You will get the list of packages along with its download size. You need to type Y and press Enter to begin the update.

 
Last metadata expiration check: 0:13:04 ago on Wed 23 Oct 2019 04:43:10 AM EDT.
Dependencies resolved.
============================================================================================================================
 Package                               Arch              Version                                    Repository         Size
============================================================================================================================
Upgrading:
 bash                                  x86_64            4.4.19-8.el8_0                             BaseOS            1.5 M
 bind-export-libs                      x86_64            32:9.11.4-17.P2.el8_0.1                    BaseOS            1.1 M
 grub2-common                          noarch            1:2.02-66.el8_0.1                          BaseOS            880 k
 grub2-pc                              x86_64            1:2.02-66.el8_0.1                          BaseOS             35 k
 grub2-pc-modules                      noarch            1:2.02-66.el8_0.1                          BaseOS            899 k
 grub2-tools                           x86_64            1:2.02-66.el8_0.1                          BaseOS            1.9 M
 grub2-tools-extra                     x86_64            1:2.02-66.el8_0.1                          BaseOS            1.0 M
 grub2-tools-minimal                   x86_64            1:2.02-66.el8_0.1                          BaseOS            196 k

.     .     .
.     .     .

 sssd-kcm                              x86_64            2.0.0-43.el8_0.3                           BaseOS            207 k
 sssd-nfs-idmap                        x86_64            2.0.0-43.el8_0.3                           BaseOS             94 k
 systemd                               x86_64            239-13.el8_0.5                             BaseOS            3.4 M
 systemd-libs                          x86_64            239-13.el8_0.5                             BaseOS            551 k
 systemd-pam                           x86_64            239-13.el8_0.5                             BaseOS            222 k
 systemd-udev                          x86_64            239-13.el8_0.5                             BaseOS            1.3 M
 epel-release                          noarch            8-6.el8                                    epel               21 k
Installing dependencies:
 grub2-tools-efi                       x86_64            1:2.02-66.el8_0.1                          BaseOS            444 k

Transaction Summary
============================================================================================================================
Install   1 Package
Upgrade  50 Packages

Total download size: 47 M
Is this ok [y/N]: Y  << Press Y and Enter
Downloading Packages:
(1/51): grub2-tools-efi-2.02-66.el8_0.1.x86_64.rpm                                          226 kB/s | 444 kB     00:01
(2/51): bind-export-libs-9.11.4-17.P2.el8_0.1.x86_64.rpm                                    364 kB/s | 1.1 MB     00:03
(3/51): grub2-pc-2.02-66.el8_0.1.x86_64.rpm                                                 346 kB/s |  35 kB     00:00
(4/51): grub2-common-2.02-66.el8_0.1.noarch.rpm                                             575 kB/s | 880 kB     00:01
(5/51): bash-4.4.19-8.el8_0.x86_64.rpm                                                      413 kB/s | 1.5 MB     00:03
(6/51): grub2-pc-modules-2.02-66.el8_0.1.noarch.rpm                                         699 kB/s | 899 kB     00:01
(7/51): grub2-tools-minimal-2.02-66.el8_0.1.x86_64.rpm                                      987 kB/s | 196 kB     00:00

Once the package updates are downloaded, the installer will automatically start installing it.

You may need to accept the GPG signing key if it prompts.

ADVERTISEMENT

(45/51): python3-libs-3.6.8-4.el8_0.x86_64.rpm                                              818 kB/s | 7.9 MB     00:09
(46/51): systemd-libs-239-13.el8_0.5.x86_64.rpm                                             929 kB/s | 551 kB     00:00
(47/51): systemd-pam-239-13.el8_0.5.x86_64.rpm                                              960 kB/s | 222 kB     00:00
(48/51): systemd-239-13.el8_0.5.x86_64.rpm                                                  690 kB/s | 3.4 MB     00:05
(49/51): epel-release-8-6.el8.noarch.rpm                                                    115 kB/s |  21 kB     00:00
(50/51): systemd-udev-239-13.el8_0.5.x86_64.rpm                                             959 kB/s | 1.3 MB     00:01
(51/51): selinux-policy-targeted-3.14.1-61.el8_0.2.noarch.rpm                               775 kB/s |  15 MB     00:19
----------------------------------------------------------------------------------------------------------------------------
Total                                                                                       1.5 MB/s |  47 MB     00:32
warning: /var/cache/dnf/epel-6519ee669354a484/packages/epel-release-8-6.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Extra Packages for Enterprise Linux 8 - x86_64                                              1.6 MB/s | 1.6 kB     00:00
Importing GPG key 0x2F86D6A1:
 Userid     : "Fedora EPEL (8) <epel@fedoraproject.org>"
 Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Is this ok [y/N]: Y  << Press Y and Enter
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                    1/1
  Running scriptlet: bash-4.4.19-8.el8_0.x86_64                                                                         1/1
  Upgrading        : bash-4.4.19-8.el8_0.x86_64                                                                       1/101
  Running scriptlet: bash-4.4.19-8.el8_0.x86_64                                                                       1/101
  Upgrading        : grub2-common-1:2.02-66.el8_0.1.noarch                                                            2/101
  Upgrading        : platform-python-3.6.8-4.el8_0.x86_64                                                             3/101
  Running scriptlet: platform-python-3.6.8-4.el8_0.x86_64                                                             3/101
  Upgrading        : python3-libs-3.6.8-4.el8_0.x86_64                                                                4/101

Wait for some time to get the system update complete.

  Verifying        : systemd-pam-239-13.el8.x86_64                                                                   97/101
  Verifying        : systemd-udev-239-13.el8_0.5.x86_64                                                              98/101
  Verifying        : systemd-udev-239-13.el8.x86_64                                                                  99/101
  Verifying        : epel-release-8-6.el8.noarch                                                                    100/101
  Verifying        : epel-release-8-5.el8.noarch                                                                    101/101

Upgraded:
  bash-4.4.19-8.el8_0.x86_64                                    bind-export-libs-32:9.11.4-17.P2.el8_0.1.x86_64
  grub2-common-1:2.02-66.el8_0.1.noarch                         grub2-pc-1:2.02-66.el8_0.1.x86_64
  grub2-pc-modules-1:2.02-66.el8_0.1.noarch                     grub2-tools-1:2.02-66.el8_0.1.x86_64
  grub2-tools-extra-1:2.02-66.el8_0.1.x86_64                    grub2-tools-minimal-1:2.02-66.el8_0.1.x86_64
  initscripts-10.00.1-1.el8_0.1.x86_64                          iptables-1.8.2-9.el8_0.1.x86_64
  iptables-ebtables-1.8.2-9.el8_0.1.x86_64                      iptables-libs-1.8.2-9.el8_0.1.x86_64
  kernel-tools-4.18.0-80.11.2.el8_0.x86_64                      kernel-tools-libs-4.18.0-80.11.2.el8_0.x86_64
  kmod-25-11.el8_0.2.x86_64                                     kmod-libs-25-11.el8_0.2.x86_64
  kpartx-0.7.8-7.el8_0.2.x86_64                                 libdnf-0.22.5-5.el8_0.x86_64
  libnfsidmap-1:2.3.3-14.el8_0.2.x86_64                         libsss_autofs-2.0.0-43.el8_0.3.x86_64
  libsss_certmap-2.0.0-43.el8_0.3.x86_64                        libsss_idmap-2.0.0-43.el8_0.3.x86_64
  libsss_nss_idmap-2.0.0-43.el8_0.3.x86_64                      libsss_sudo-2.0.0-43.el8_0.3.x86_64
  microcode_ctl-4:20180807a-2.20190618.1.el8_0.x86_64           p11-kit-0.23.14-5.el8_0.x86_64
  p11-kit-trust-0.23.14-5.el8_0.x86_64                          platform-python-3.6.8-4.el8_0.x86_64
  python3-hawkey-0.22.5-5.el8_0.x86_64                          python3-libdnf-0.22.5-5.el8_0.x86_64
  python3-libs-3.6.8-4.el8_0.x86_64                             python3-perf-4.18.0-80.11.2.el8_0.x86_64
  python3-rpm-4.14.2-11.el8_0.x86_64                            rpm-4.14.2-11.el8_0.x86_64
  rpm-build-libs-4.14.2-11.el8_0.x86_64                         rpm-libs-4.14.2-11.el8_0.x86_64
  rpm-plugin-selinux-4.14.2-11.el8_0.x86_64                     rpm-plugin-systemd-inhibit-4.14.2-11.el8_0.x86_64
  selinux-policy-3.14.1-61.el8_0.2.noarch                       selinux-policy-targeted-3.14.1-61.el8_0.2.noarch
  setup-2.12.2-2.el8.noarch                                     sssd-client-2.0.0-43.el8_0.3.x86_64
  sssd-common-2.0.0-43.el8_0.3.x86_64                           sssd-kcm-2.0.0-43.el8_0.3.x86_64
  sssd-nfs-idmap-2.0.0-43.el8_0.3.x86_64                        systemd-239-13.el8_0.5.x86_64
  systemd-libs-239-13.el8_0.5.x86_64                            systemd-pam-239-13.el8_0.5.x86_64
  systemd-udev-239-13.el8_0.5.x86_64                            epel-release-8-6.el8.noarch

Installed:
  grub2-tools-efi-1:2.02-66.el8_0.1.x86_64

Complete!

Once the packages are installed, reboot your machine

reboot

Verify Updates

Use the check-update command to see if any updates are pending for installation.

yum check-update

Should not return any output

OR

If you check the system console or booting screen, it should boot through the updated kernel.

CentOS 8 Booting Through Updated Kernel
CentOS 8 Booting Through Updated Kernel

You can also very that the system is booted with the updated kernel using the below command.

uname -a

Output:

Linux centos8.itzgeek.local 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
In case the system doesn’t boot with the new kernel, boot the machine to the old kernel and then reinstall the newly installed kernel.

Conclusion

That’s All. Please share your feedback in the comments section.

You might also like