In this article, you will learn how to upgrade a CentOS 7 server to CentOS 8 server, including application software installed on this Linux server.
Table of Contents:
How to Upgrade to CentOS 8? :
CentOS 8 has been released and most of the organizations looking forward to upgrade their existing installations of CentOS 7 based Linux servers to CentOS 8. Here, we are performing a complete upgrade of CentOS 7 operating system to CentOS 8 along with the installed applications (Apache web server) and databases (MySQL server).
There are many alternate ways to upgrade your CentOS 7 based applications and databases to CentOS 8. The most popular and relatively easy method is to install and configure a CentOS 8 machine in parallel with our existing CentOS 7 machine and then migrate the applications and databases to the new CentOS 8 machine.
But, we are executing an in-place upgrade of existing CentOS 7 server with installed applications and databases to the latest versions provided by CentOS 8 server.
Since you are upgrading your environment from CentOS 7 to CentOS 8, therefore, it is recommended that you should also upgrade yourself and your technical resources as well.
For this purpose, we highly recommend you to read Red Hat RHCSA 8 Cert Guide: EX200 (Certification Guide) by Pearson IT Certification.
Environment Specification:
We are using a virtual machine with following specifications, where we have installed CentOS 7 based LAMP server.
- CPU - 3.4 Ghz (2 cores)
- Memory - 2 GB
- Storage - 20 GB
- Operating System - CentOS 7.7
- Hostname - centos-7-server.centlinux.com
- IP Address - 192.168.116.215 /24
Gathering System Information about CentOS 7 Server:
Connect with centos-7-server.centlinux.com as root user by using a ssh client.
Check the current version of Linux Kernel.
[root@centos-7-server ~]# uname -r
3.10.0-1062.7.1.el7.x86_64
Check the current version of Apache web server.
[root@centos-7-server ~]# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Aug 8 2019 11:41:18
Check the current version of PHP programming language.
[root@centos-7-server ~]# php -v
PHP 5.4.16 (cli) (built: Nov 1 2019 16:04:20)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Check the current version of MySQL server.
[root@centos-7-server ~]# mysql -V
mysql Ver 15.1 Distrib 5.5.64-MariaDB, for Linux (x86_64) using readline 5.1
Open URL http://centos-7-server.centlinux.com in a web browser.
Installing EPEL yum Repository on CentOS 7:
We are required some software packages that are available in EPEL (Extra Packages for Enterprise Linux) yum repository.
Therefore, we are installing epel-release package to enable EPEL yum repository on our Linux server.
[root@centos-7-server ~]# yum install -y epel-release.noarch
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.ges.net.pk
* extras: mirrors.ges.net.pk
* updates: repo.isra.edu.pk
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
epel-release noarch 7-11 extras 15 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 15 k
Installed size: 24 k
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-11.noarch 1/1
Verifying : epel-release-7-11.noarch 1/1
Installed:
epel-release.noarch 0:7-11
Complete!
Build cache for EPEL yum repository.
[root@centos-7-server ~]# yum makecache fast
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 9.2 kB 00:00
* base: mirrors.ges.net.pk
* epel: my.fedora.ipserverone.com
* extras: mirrors.ges.net.pk
* updates: repo.isra.edu.pk
base | 3.6 kB 00:00
epel | 5.3 kB 00:00
extras | 2.9 kB 00:00
updates | 2.9 kB 00:00
(1/3): epel/x86_64/group_gz | 90 kB 00:00
(2/3): epel/x86_64/updateinfo | 1.0 MB 00:02
(3/3): epel/x86_64/primary_db | 6.9 MB 00:09
Metadata Cache Created
EPEL yum repository for CentOS 7 has been installed.
Installing Required Packages on CentOS 7:
There are some supplementary packages required by Linux package manager during upgrade process. Therefore, install these software packages by using yum command.
[root@centos-7-server ~]# yum install -y yum-utils rpmconf
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.ges.net.pk
* epel: epel.dionipe.id
* extras: mirrors.ges.net.pk
* updates: repo.isra.edu.pk
Package yum-utils-1.1.31-52.el7.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package rpmconf.noarch 0:0.3.4-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
rpmconf noarch 0.3.4-1.el7 epel 21 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 21 k
Installed size: 45 k
Downloading packages:
warning: /var/cache/yum/x86_64/7/epel/packages/rpmconf-0.3.4-1.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for rpmconf-0.3.4-1.el7.noarch.rpm is not installed
rpmconf-0.3.4-1.el7.noarch.rpm | 21 kB 00:06
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
Userid : "Fedora EPEL (7) <epel@fedoraproject.org>"
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
Package : epel-release-7-11.noarch (@extras)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : rpmconf-0.3.4-1.el7.noarch 1/1
Verifying : rpmconf-0.3.4-1.el7.noarch 1/1
Installed:
rpmconf.noarch 0:0.3.4-1.el7
Complete!
Removing Duplicate/Unused Packages and Configurations:
Locate and remove conflicting configuration files (.rpmnew, .rpmsave and .rpmorigfiles) by using rpmconf command. These files were created during installation of the new versions of a already installed software package.
[root@centos-7-server ~]# rpmconf -a
Configuration file `/etc/nsswitch.conf'
-rw-r--r--. 1 root root 1746 Dec 22 2018 /etc/nsswitch.conf
-rw-r--r--. 1 root root 1938 Aug 7 04:00 /etc/nsswitch.conf.rpmnew
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
M : merge configuration files
Z : background this process to examine the situation
S : skip this file
The default action is to keep your current version.
*** aliases (Y/I/N/O/D/Z/S) [default=N] ?
Your choice:
List down software packages that are not required by any other installed package.
[root@centos-7-server ~]# package-cleanup --leaves
Loaded plugins: fastestmirror
bind-libs-lite-9.11.4-9.P2.el7.x86_64
libsysfs-2.1.0-16.el7.x86_64
List down older or duplicate software packages that are not available in currently configured yum repositories.
[root@centos-7-server ~]# package-cleanup --orphans
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.ges.net.pk
* epel: my.fedora.ipserverone.com
* extras: mirrors.ges.net.pk
* updates: repo.isra.edu.pk
kernel-3.10.0-957.el7.x86_64
Uninstall all the software packages that are listed by the above package-cleanup commands.
[root@centos-7-server ~]# yum remove -y \
> bind-libs-lite-9.11.4-9.P2.el7.x86_64 \
> libsysfs-2.1.0-16.el7.x86_64 \
> kernel-3.10.0-957.el7.x86_64
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package bind-libs-lite.x86_64 32:9.11.4-9.P2.el7 will be erased
---> Package kernel.x86_64 0:3.10.0-957.el7 will be erased
---> Package libsysfs.x86_64 0:2.1.0-16.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
bind-libs-lite x86_64 32:9.11.4-9.P2.el7 @base 2.9 M
kernel x86_64 3.10.0-957.el7 @anaconda 63 M
libsysfs x86_64 2.1.0-16.el7 @anaconda 146 k
Transaction Summary
================================================================================
Remove 3 Packages
Installed size: 66 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : kernel-3.10.0-957.el7.x86_64 1/3
Erasing : libsysfs-2.1.0-16.el7.x86_64 2/3
Erasing : 32:bind-libs-lite-9.11.4-9.P2.el7.x86_64 3/3
Verifying : 32:bind-libs-lite-9.11.4-9.P2.el7.x86_64 1/3
Verifying : kernel-3.10.0-957.el7.x86_64 2/3
Verifying : libsysfs-2.1.0-16.el7.x86_64 3/3
Removed:
bind-libs-lite.x86_64 32:9.11.4-9.P2.el7 kernel.x86_64 0:3.10.0-957.el7
libsysfs.x86_64 0:2.1.0-16.el7
Complete!
Upgrade the Package Manager from YUM to DNF:
In CentOS 8, the default Linux package manager, yum has been replaced by the dnf (Dandified Yum).
Therefore, we have to switch to the dnf package manager before upgrading our CentOS 7 server.
Install dnf package manager by using yum command.
[root@centos-7-server ~]# yum install -y dnf
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.ges.net.pk
* epel: my.fedora.ipserverone.com
* extras: mirrors.ges.net.pk
* updates: repo.isra.edu.pk
Resolving Dependencies
--> Running transaction check
---> Package dnf.noarch 0:4.0.9.2-1.el7_6 will be installed
--> Processing Dependency: python2-dnf = 4.0.9.2-1.el7_6 for package: dnf-4.0.9.2-1.el7_6.noarch
--> Running transaction check
---> Package python2-dnf.noarch 0:4.0.9.2-1.el7_6 will be installed
--> Processing Dependency: dnf-data = 4.0.9.2-1.el7_6 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
--> Processing Dependency: python2-libdnf >= 0.22.5 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
--> Processing Dependency: python2-libcomps >= 0.1.8 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
--> Processing Dependency: python2-hawkey >= 0.22.5 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
--> Processing Dependency: libmodulemd >= 1.4.0 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
--> Processing Dependency: python2-libdnf for package: python2-dnf-4.0.9.2-1.el7_6.noarch
--> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
--> Processing Dependency: deltarpm for package: python2-dnf-4.0.9.2-1.el7_6.noarch
--> Running transaction check
---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed
---> Package dnf-data.noarch 0:4.0.9.2-1.el7_6 will be installed
--> Processing Dependency: libreport-filesystem for package: dnf-data-4.0.9.2-1.el7_6.noarch
---> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed
--> Processing Dependency: libyaml-0.so.2()(64bit) for package: libmodulemd-1.6.3-1.el7.x86_64
---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
---> Package python2-hawkey.x86_64 0:0.22.5-1.el7_6 will be installed
--> Processing Dependency: libdnf(x86-64) = 0.22.5-1.el7_6 for package: python2-hawkey-0.22.5-1.el7_6.x86_64
--> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
--> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
--> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
--> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
--> Processing Dependency: librepo.so.0()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
--> Processing Dependency: libdnf.so.2()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
---> Package python2-libcomps.x86_64 0:0.1.8-12.el7 will be installed
--> Processing Dependency: libcomps(x86-64) = 0.1.8-12.el7 for package: python2-libcomps-0.1.8-12.el7.x86_64
--> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-12.el7.x86_64
---> Package python2-libdnf.x86_64 0:0.22.5-1.el7_6 will be installed
--> Running transaction check
---> Package libcomps.x86_64 0:0.1.8-12.el7 will be installed
---> Package libdnf.x86_64 0:0.22.5-1.el7_6 will be installed
---> Package librepo.x86_64 0:1.8.1-7.el7 will be installed
---> Package libreport-filesystem.x86_64 0:2.1.11-43.el7.centos will be installed
---> Package libsolv.x86_64 0:0.6.34-4.el7 will be installed
---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dnf noarch 4.0.9.2-1.el7_6 extras 357 k
Installing for dependencies:
deltarpm x86_64 3.6-3.el7 base 82 k
dnf-data noarch 4.0.9.2-1.el7_6 extras 51 k
libcomps x86_64 0.1.8-12.el7 extras 75 k
libdnf x86_64 0.22.5-1.el7_6 extras 533 k
libmodulemd x86_64 1.6.3-1.el7 extras 141 k
librepo x86_64 1.8.1-7.el7 base 81 k
libreport-filesystem x86_64 2.1.11-43.el7.centos base 40 k
libsolv x86_64 0.6.34-4.el7 base 329 k
libyaml x86_64 0.1.4-11.el7_0 base 55 k
python-enum34 noarch 1.0.4-1.el7 base 52 k
python2-dnf noarch 4.0.9.2-1.el7_6 extras 414 k
python2-hawkey x86_64 0.22.5-1.el7_6 extras 68 k
python2-libcomps x86_64 0.1.8-12.el7 extras 47 k
python2-libdnf x86_64 0.22.5-1.el7_6 extras 608 k
Transaction Summary
================================================================================
Install 1 Package (+14 Dependent packages)
Total download size: 2.9 M
Installed size: 11 M
Downloading packages:
(1/15): deltarpm-3.6-3.el7.x86_64.rpm | 82 kB 00:01
(2/15): dnf-data-4.0.9.2-1.el7_6.noarch.rpm | 51 kB 00:01
(3/15): libcomps-0.1.8-12.el7.x86_64.rpm | 75 kB 00:01
(4/15): librepo-1.8.1-7.el7.x86_64.rpm | 81 kB 00:00
(5/15): dnf-4.0.9.2-1.el7_6.noarch.rpm | 357 kB 00:02
(6/15): libyaml-0.1.4-11.el7_0.x86_64.rpm | 55 kB 00:00
(7/15): libsolv-0.6.34-4.el7.x86_64.rpm | 329 kB 00:00
(8/15): python-enum34-1.0.4-1.el7.noarch.rpm | 52 kB 00:00
(9/15): libmodulemd-1.6.3-1.el7.x86_64.rpm | 141 kB 00:01
(10/15): python2-dnf-4.0.9.2-1.el7_6.noarch.rpm | 414 kB 00:00
(11/15): python2-libcomps-0.1.8-12.el7.x86_64.rpm | 47 kB 00:00
(12/15): python2-hawkey-0.22.5-1.el7_6.x86_64.rpm | 68 kB 00:02
(13/15): libreport-filesystem-2.1.11-43.el7.centos.x86_64. | 40 kB 00:03
(14/15): python2-libdnf-0.22.5-1.el7_6.x86_64.rpm | 608 kB 00:02
(15/15): libdnf-0.22.5-1.el7_6.x86_64.rpm | 533 kB 00:07
--------------------------------------------------------------------------------
Total 396 kB/s | 2.9 MB 00:07
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : librepo-1.8.1-7.el7.x86_64 1/15
Installing : libsolv-0.6.34-4.el7.x86_64 2/15
Installing : libcomps-0.1.8-12.el7.x86_64 3/15
Installing : python2-libcomps-0.1.8-12.el7.x86_64 4/15
Installing : libreport-filesystem-2.1.11-43.el7.centos.x86_64 5/15
Installing : dnf-data-4.0.9.2-1.el7_6.noarch 6/15
Installing : python-enum34-1.0.4-1.el7.noarch 7/15
Installing : deltarpm-3.6-3.el7.x86_64 8/15
Installing : libyaml-0.1.4-11.el7_0.x86_64 9/15
Installing : libmodulemd-1.6.3-1.el7.x86_64 10/15
Installing : libdnf-0.22.5-1.el7_6.x86_64 11/15
Installing : python2-libdnf-0.22.5-1.el7_6.x86_64 12/15
Installing : python2-hawkey-0.22.5-1.el7_6.x86_64 13/15
Installing : python2-dnf-4.0.9.2-1.el7_6.noarch 14/15
Installing : dnf-4.0.9.2-1.el7_6.noarch 15/15
Verifying : libsolv-0.6.34-4.el7.x86_64 1/15
Verifying : libyaml-0.1.4-11.el7_0.x86_64 2/15
Verifying : python2-libdnf-0.22.5-1.el7_6.x86_64 3/15
Verifying : python2-libcomps-0.1.8-12.el7.x86_64 4/15
Verifying : dnf-data-4.0.9.2-1.el7_6.noarch 5/15
Verifying : deltarpm-3.6-3.el7.x86_64 6/15
Verifying : libmodulemd-1.6.3-1.el7.x86_64 7/15
Verifying : python2-hawkey-0.22.5-1.el7_6.x86_64 8/15
Verifying : python-enum34-1.0.4-1.el7.noarch 9/15
Verifying : python2-dnf-4.0.9.2-1.el7_6.noarch 10/15
Verifying : libdnf-0.22.5-1.el7_6.x86_64 11/15
Verifying : libreport-filesystem-2.1.11-43.el7.centos.x86_64 12/15
Verifying : librepo-1.8.1-7.el7.x86_64 13/15
Verifying : libcomps-0.1.8-12.el7.x86_64 14/15
Verifying : dnf-4.0.9.2-1.el7_6.noarch 15/15
Installed:
dnf.noarch 0:4.0.9.2-1.el7_6
Dependency Installed:
deltarpm.x86_64 0:3.6-3.el7
dnf-data.noarch 0:4.0.9.2-1.el7_6
libcomps.x86_64 0:0.1.8-12.el7
libdnf.x86_64 0:0.22.5-1.el7_6
libmodulemd.x86_64 0:1.6.3-1.el7
librepo.x86_64 0:1.8.1-7.el7
libreport-filesystem.x86_64 0:2.1.11-43.el7.centos
libsolv.x86_64 0:0.6.34-4.el7
libyaml.x86_64 0:0.1.4-11.el7_0
python-enum34.noarch 0:1.0.4-1.el7
python2-dnf.noarch 0:4.0.9.2-1.el7_6
python2-hawkey.x86_64 0:0.22.5-1.el7_6
python2-libcomps.x86_64 0:0.1.8-12.el7
python2-libdnf.x86_64 0:0.22.5-1.el7_6
Complete!
Yum is not required anymore, therefore we are removing yum package manager using dnf command.
[root@centos-7-server ~]# dnf remove -y yum yum-metadata-parser
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
yum noarch 3.4.3-163.el7.centos @System 5.6 M
yum-metadata-parser x86_64 1.1.4-10.el7 @System 57 k
Removing dependent packages:
yum-plugin-fastestmirror noarch 1.1.31-52.el7 @System 53 k
yum-utils noarch 1.1.31-52.el7 @System 337 k
Transaction Summary
================================================================================
Remove 4 Packages
Freed space: 6.0 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Erasing : yum-utils-1.1.31-52.el7.noarch 1/4
Erasing : yum-plugin-fastestmirror-1.1.31-52.el7.noarch 2/4
Erasing : yum-3.4.3-163.el7.centos.noarch 3/4
Erasing : yum-metadata-parser-1.1.4-10.el7.x86_64 4/4
Verifying : yum-3.4.3-163.el7.centos.noarch 1/4
Verifying : yum-metadata-parser-1.1.4-10.el7.x86_64 2/4
Verifying : yum-plugin-fastestmirror-1.1.31-52.el7.noarch 3/4
Verifying : yum-utils-1.1.31-52.el7.noarch 4/4
Removed:
yum-3.4.3-163.el7.centos.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-plugin-fastestmirror-1.1.31-52.el7.noarch
yum-utils-1.1.31-52.el7.noarch
Complete!
Remove any left behind yum configurations.
[root@centos-7-server ~]# rm -Rf /etc/yum
Build cache for dnf repositories.
[root@centos-7-server ~]# dnf makecache
Extra Packages for Enterprise Linux 7 - x86_64 54 kB/s | 16 MB 05:08
CentOS-7 - Base 991 kB/s | 10 MB 00:10
CentOS-7 - Updates 1.2 MB/s | 7.0 MB 00:05
CentOS-7 - Extras 1.5 MB/s | 251 kB 00:00
Metadata cache created.
Upgrading CentOS 7 server to Latest Stable Version:
Our Linux server is now ready to upgrade to CentOS 8.
Execute the following command to update software packages to latest CentOS 7 versions.
[root@centos-7-server ~]# dnf upgrade -y
Last metadata expiration check: 0:06:17 ago on Fri 17 Jan 2020 09:26:37 PM PKT.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Upgrading:
epel-release noarch 7-12 epel 15 k
kernel-tools x86_64 3.10.0-1062.9.1.el7 updates 7.8 M
kernel-tools-libs x86_64 3.10.0-1062.9.1.el7 updates 7.8 M
microcode_ctl x86_64 2:2.1-53.7.el7_7 updates 2.5 M
nss x86_64 3.44.0-7.el7_7 updates 854 k
nss-softokn x86_64 3.44.0-8.el7_7 updates 330 k
nss-softokn-freebl x86_64 3.44.0-8.el7_7 updates 224 k
nss-sysinit x86_64 3.44.0-7.el7_7 updates 65 k
nss-tools x86_64 3.44.0-7.el7_7 updates 528 k
nss-util x86_64 3.44.0-4.el7_7 updates 79 k
open-vm-tools x86_64 10.3.0-2.el7_7.1 updates 672 k
python-perf x86_64 3.10.0-1062.9.1.el7 updates 7.8 M
Installing dependencies:
kernel x86_64 3.10.0-1062.9.1.el7 updates 50 M
Transaction Summary
================================================================================
Install 1 Package
Upgrade 12 Packages
Total download size: 78 M
Downloading Packages:
(1/13): epel-release-7-12.noarch.rpm 19 kB/s | 15 kB 00:00
(2/13): kernel-tools-3.10.0-1062.9.1.el7.x86_64 103 kB/s | 7.8 MB 01:17
(3/13): kernel-tools-libs-3.10.0-1062.9.1.el7.x 102 kB/s | 7.8 MB 01:17
(4/13): microcode_ctl-2.1-53.7.el7_7.x86_64.rpm 366 kB/s | 2.5 MB 00:07
(5/13): nss-softokn-3.44.0-8.el7_7.x86_64.rpm 531 kB/s | 330 kB 00:00
(6/13): nss-softokn-freebl-3.44.0-8.el7_7.x86_6 498 kB/s | 224 kB 00:00
(7/13): nss-3.44.0-7.el7_7.x86_64.rpm 113 kB/s | 854 kB 00:07
(8/13): nss-sysinit-3.44.0-7.el7_7.x86_64.rpm 462 kB/s | 65 kB 00:00
(9/13): nss-util-3.44.0-4.el7_7.x86_64.rpm 490 kB/s | 79 kB 00:00
(10/13): open-vm-tools-10.3.0-2.el7_7.1.x86_64. 611 kB/s | 672 kB 00:01
(11/13): nss-tools-3.44.0-7.el7_7.x86_64.rpm 226 kB/s | 528 kB 00:02
(12/13): python-perf-3.10.0-1062.9.1.el7.x86_64 592 kB/s | 7.8 MB 00:13
(13/13): kernel-3.10.0-1062.9.1.el7.x86_64.rpm 403 kB/s | 50 MB 02:06
--------------------------------------------------------------------------------
Total 626 kB/s | 78 MB 02:08
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Upgrading : nss-util-3.44.0-4.el7_7.x86_64 1/25
Running scriptlet: nss-util-3.44.0-4.el7_7.x86_64 1/25
Upgrading : nss-softokn-freebl-3.44.0-8.el7_7.x86_64 2/25
Upgrading : nss-softokn-3.44.0-8.el7_7.x86_64 3/25
Running scriptlet: nss-softokn-3.44.0-8.el7_7.x86_64 3/25
Upgrading : nss-sysinit-3.44.0-7.el7_7.x86_64 4/25
Upgrading : nss-3.44.0-7.el7_7.x86_64 5/25
Running scriptlet: nss-3.44.0-7.el7_7.x86_64 5/25
Upgrading : kernel-tools-libs-3.10.0-1062.9.1.el7.x86_64 6/25
Upgrading : kernel-tools-3.10.0-1062.9.1.el7.x86_64 7/25
Running scriptlet: kernel-tools-3.10.0-1062.9.1.el7.x86_64 7/25
Upgrading : nss-tools-3.44.0-7.el7_7.x86_64 8/25
Upgrading : python-perf-3.10.0-1062.9.1.el7.x86_64 9/25
Upgrading : open-vm-tools-10.3.0-2.el7_7.1.x86_64 10/25
Running scriptlet: open-vm-tools-10.3.0-2.el7_7.1.x86_64 10/25
Upgrading : microcode_ctl-2:2.1-53.7.el7_7.x86_64 11/25
Running scriptlet: microcode_ctl-2:2.1-53.7.el7_7.x86_64 11/25
Upgrading : epel-release-7-12.noarch 12/25
Installing : kernel-3.10.0-1062.9.1.el7.x86_64 13/25
Running scriptlet: kernel-3.10.0-1062.9.1.el7.x86_64 13/25
Running scriptlet: microcode_ctl-2:2.1-53.3.el7_7.x86_64 14/25
Cleanup : microcode_ctl-2:2.1-53.3.el7_7.x86_64 14/25
Running scriptlet: microcode_ctl-2:2.1-53.3.el7_7.x86_64 14/25
Cleanup : epel-release-7-11.noarch 15/25
Cleanup : nss-tools-3.44.0-4.el7.x86_64 16/25
Cleanup : nss-sysinit-3.44.0-4.el7.x86_64 17/25
Cleanup : nss-3.44.0-4.el7.x86_64 18/25
Running scriptlet: nss-3.44.0-4.el7.x86_64 18/25
Cleanup : nss-softokn-3.44.0-5.el7.x86_64 19/25
Running scriptlet: nss-softokn-3.44.0-5.el7.x86_64 19/25
Cleanup : nss-softokn-freebl-3.44.0-5.el7.x86_64 20/25
Cleanup : kernel-tools-3.10.0-1062.7.1.el7.x86_64 21/25
Running scriptlet: kernel-tools-3.10.0-1062.7.1.el7.x86_64 21/25
Cleanup : kernel-tools-libs-3.10.0-1062.7.1.el7.x86_64 22/25
Cleanup : nss-util-3.44.0-3.el7.x86_64 23/25
Running scriptlet: nss-util-3.44.0-3.el7.x86_64 23/25
Cleanup : python-perf-3.10.0-1062.7.1.el7.x86_64 24/25
Running scriptlet: open-vm-tools-10.3.0-2.el7.x86_64 25/25
Cleanup : open-vm-tools-10.3.0-2.el7.x86_64 25/25
Running scriptlet: open-vm-tools-10.3.0-2.el7.x86_64 25/25
Running scriptlet: microcode_ctl-2:2.1-53.7.el7_7.x86_64 25/25
Running scriptlet: kernel-3.10.0-1062.9.1.el7.x86_64 25/25
Verifying : kernel-3.10.0-1062.9.1.el7.x86_64 1/25
Verifying : epel-release-7-12.noarch 2/25
Verifying : epel-release-7-11.noarch 3/25
Verifying : kernel-tools-3.10.0-1062.9.1.el7.x86_64 4/25
Verifying : kernel-tools-3.10.0-1062.7.1.el7.x86_64 5/25
Verifying : kernel-tools-libs-3.10.0-1062.9.1.el7.x86_64 6/25
Verifying : kernel-tools-libs-3.10.0-1062.7.1.el7.x86_64 7/25
Verifying : microcode_ctl-2:2.1-53.7.el7_7.x86_64 8/25
Verifying : microcode_ctl-2:2.1-53.3.el7_7.x86_64 9/25
Verifying : nss-3.44.0-7.el7_7.x86_64 10/25
Verifying : nss-3.44.0-4.el7.x86_64 11/25
Verifying : nss-softokn-3.44.0-8.el7_7.x86_64 12/25
Verifying : nss-softokn-3.44.0-5.el7.x86_64 13/25
Verifying : nss-softokn-freebl-3.44.0-8.el7_7.x86_64 14/25
Verifying : nss-softokn-freebl-3.44.0-5.el7.x86_64 15/25
Verifying : nss-sysinit-3.44.0-7.el7_7.x86_64 16/25
Verifying : nss-sysinit-3.44.0-4.el7.x86_64 17/25
Verifying : nss-tools-3.44.0-7.el7_7.x86_64 18/25
Verifying : nss-tools-3.44.0-4.el7.x86_64 19/25
Verifying : nss-util-3.44.0-4.el7_7.x86_64 20/25
Verifying : nss-util-3.44.0-3.el7.x86_64 21/25
Verifying : open-vm-tools-10.3.0-2.el7_7.1.x86_64 22/25
Verifying : open-vm-tools-10.3.0-2.el7.x86_64 23/25
Verifying : python-perf-3.10.0-1062.9.1.el7.x86_64 24/25
Verifying : python-perf-3.10.0-1062.7.1.el7.x86_64 25/25
Upgraded:
epel-release-7-12.noarch
kernel-tools-3.10.0-1062.9.1.el7.x86_64
kernel-tools-libs-3.10.0-1062.9.1.el7.x86_64
microcode_ctl-2:2.1-53.7.el7_7.x86_64
nss-3.44.0-7.el7_7.x86_64
nss-softokn-3.44.0-8.el7_7.x86_64
nss-softokn-freebl-3.44.0-8.el7_7.x86_64
nss-sysinit-3.44.0-7.el7_7.x86_64
nss-tools-3.44.0-7.el7_7.x86_64
nss-util-3.44.0-4.el7_7.x86_64
open-vm-tools-10.3.0-2.el7_7.1.x86_64
python-perf-3.10.0-1062.9.1.el7.x86_64
Installed:
kernel-3.10.0-1062.9.1.el7.x86_64
Complete!
Upgrading Yum Repositories from CentOS 7 to CentOS 8:
To upgrade our yum repositories, we have to upgrade centos-release package from CentOS 7 to CentOS 8.
[root@centos-7-server ~]# dnf upgrade -y http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/{centos-release-8.1-1.1911.0.8.el8.x86_64.rpm,centos-gpg-keys-8.1-1.1911.0.8.el8.noarch.rpm,centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm}
Last metadata expiration check: 0:11:02 ago on Fri 17 Jan 2020 09:44:30 PM PKT.
centos-release-8.1-1.1911.0.8.el8.x86_64.rpm 43 kB/s | 21 kB 00:00
centos-gpg-keys-8.1-1.1911.0.8.el8.noarch.rpm 4.7 kB/s | 11 kB 00:02
centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm 24 kB/s | 12 kB 00:00
Package centos-gpg-keys not installed, cannot update it.
No match for argument: /var/cache/dnf/commandline-5fda33494c9fb882/packages/centos-gpg-keys-8.1-1.1911.0.8.el8.noarch.rpm
Package centos-repos not installed, cannot update it.
No match for argument: /var/cache/dnf/commandline-5fda33494c9fb882/packages/centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Upgrading:
centos-release x86_64 8.1-1.1911.0.8.el8 @commandline 21 k
Installing dependencies:
centos-gpg-keys noarch 8.1-1.1911.0.8.el8 @commandline 11 k
centos-repos x86_64 8.1-1.1911.0.8.el8 @commandline 12 k
Transaction Summary
================================================================================
Install 2 Packages
Upgrade 1 Package
Total size: 44 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : centos-gpg-keys-8.1-1.1911.0.8.el8.noarch 1/4
Installing : centos-repos-8.1-1.1911.0.8.el8.x86_64 2/4
Upgrading : centos-release-8.1-1.1911.0.8.el8.x86_64 3/4
Cleanup : centos-release-7-7.1908.0.el7.centos.x86_64 4/4
warning: file /etc/yum/vars/infra: remove failed: No such file or directory
warning: file /etc/yum/vars/contentdir: remove failed: No such file or directory
Verifying : centos-gpg-keys-8.1-1.1911.0.8.el8.noarch 1/4
Verifying : centos-repos-8.1-1.1911.0.8.el8.x86_64 2/4
Verifying : centos-release-8.1-1.1911.0.8.el8.x86_64 3/4
Verifying : centos-release-7-7.1908.0.el7.centos.x86_64 4/4
Upgraded:
centos-release-8.1-1.1911.0.8.el8.x86_64
Installed:
centos-gpg-keys-8.1-1.1911.0.8.el8.noarch
centos-repos-8.1-1.1911.0.8.el8.x86_64
Complete!
Upgrade EPEL yum repository from EL 7 to EL 8.
[root@centos-7-server ~]# dnf upgrade -y epel-release
Last metadata expiration check: 0:09:31 ago on Fri 17 Jan 2020 10:01:25 PM PKT.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Upgrading:
epel-release noarch 8-5.el8 extras 22 k
Transaction Summary
================================================================================
Upgrade 1 Package
Total download size: 22 k
Downloading Packages:
epel-release-8-5.el8.noarch.rpm 241 kB/s | 22 kB 00:00
--------------------------------------------------------------------------------
Total 34 kB/s | 22 kB 00:00
warning: /var/cache/dnf/extras-2770d521ba03e231/packages/epel-release-8-5.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
CentOS-8 - Extras 0.0 B/s | 0 B 00:00
Importing GPG key 0x8483C65D:
Userid : "CentOS (CentOS Official Signing Key) <security@centos.org>"
Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Upgrading : epel-release-8-5.el8.noarch 1/2
Cleanup : epel-release-7-12.noarch 2/2
Verifying : epel-release-8-5.el8.noarch 1/2
Verifying : epel-release-7-12.noarch 2/2
Upgraded:
epel-release-8-5.el8.noarch
Complete!
Build cache for all yum repositories.
[root@centos-7-server ~]# dnf makecache
Extra Packages for Enterprise Linux 8 - x86_64 30 kB/s | 5.2 MB 02:57
CentOS-8 - Base 0.0 B/s | 0 B 00:00
CentOS-8 - AppStream 0.0 B/s | 0 B 00:00
CentOS-8 - Extras 0.0 B/s | 0 B 00:00
Metadata cache created.
All of our yum repositories has been upgraded from CentOS 7 to CentOS 8.
Upgrading CentOS 7 to CentOS 8 Server:
Remove all installed kernels using following rpm command.
[root@centos-7-server ~]# rpm -e `rpm -q kernel`
Removing any conflicting software packages, that are provided by the above command. We have only one conflicting package i.e. sysvinit-tools, and we are removing it by using rpm command.
[root@centos-7-server ~]# rpm -e --nodeps sysvinit-tools
Please ensure that, you have removed all the conflicting software packages before moving forward. You need to repeat the rpm -e ‘rpm -q kernel’ command again after removing the conflicting packages.
Start Linux operating system upgrade by using following command.
[root@centos-7-server ~]# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
...
python3-gpg-1.10.0-6.el8.0.1.x86_64
python3-hawkey-0.35.1-9.el8_1.x86_64
python3-libcomps-0.1.11-2.el8.x86_64
python3-libdnf-0.35.1-9.el8_1.x86_64
python3-libs-3.6.8-15.1.el8.x86_64
python3-libselinux-2.9-2.1.el8.x86_64
python3-libxml2-2.9.7-5.el8.x86_64
python3-linux-procfs-0.6-7.el8.noarch
python3-perf-4.18.0-147.3.1.el8_1.x86_64
python3-pip-wheel-9.0.3-15.el8.noarch
python3-pyudev-0.21.0-7.el8.noarch
python3-rpm-4.14.2-25.el8.x86_64
python3-schedutils-0.6-6.el8.x86_64
python3-setuptools-wheel-39.2.0-5.el8.noarch
python3-six-1.11.0-8.el8.noarch
python3-slip-0.6.4-11.el8.noarch
python3-slip-dbus-0.6.4-11.el8.noarch
python3-syspurpose-1.25.17-1.el8.x86_64
readonly-root-10.00.4-1.el8.noarch
rpm-plugin-selinux-4.14.2-25.el8.x86_64
sqlite-libs-3.26.0-3.el8.x86_64
squashfs-tools-4.3-19.el8.x86_64
systemd-container-239-18.el8_1.1.x86_64
systemd-pam-239-18.el8_1.1.x86_64
systemd-udev-239-18.el8_1.1.x86_64
trousers-lib-0.3.14-4.el8.x86_64
authselect-compat-1.1-2.el8.x86_64
centos-logos-httpd-80.5-2.el8.noarch
compat-openssl10-1:1.0.2o-3.el8.x86_64
httpd-filesystem-2.4.37-16.module_el8.1.0+256+ae790463.noarch
mariadb-common-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
mariadb-connector-c-3.0.7-1.el8.x86_64
mariadb-connector-c-config-3.0.7-1.el8.noarch
mariadb-errmsg-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
mod_http2-1.11.3-3.module_el8.1.0+213+acce2796.x86_64
nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch
oddjob-0.34.4-7.el8.x86_64
perl-Digest-1.17-395.el8.noarch
perl-Digest-MD5-2.55-396.el8.x86_64
perl-Net-SSLeay-1.88-1.el8.x86_64
perl-URI-1.73-3.el8.noarch
perl-libnet-3.11-3.el8.noarch
python2-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64
python2-libs-2.7.16-12.module_el8.1.0+219+cf9e6ac9.x86_64
python2-pip-wheel-9.0.3-14.module_el8.1.0+219+cf9e6ac9.noarch
python2-setuptools-wheel-39.0.1-11.module_el8.1.0+219+cf9e6ac9.noarch
unbound-libs-1.7.3-8.el8.x86_64
xkeyboard-config-2.24-3.el8.noarch
Removed:
deltarpm-3.6-3.el7.x86_64
libselinux-python-2.5-14.1.el7.x86_64
libxml2-python-2.9.1-6.el7_2.3.x86_64
newt-python-0.52.15-4.el7.x86_64
perl-Net-Daemon-0.48-5.el7.noarch
perl-PlRPC-0.2020-14.el7.noarch
python-2.7.5-86.el7.x86_64
python-chardet-2.2.1-3.el7.noarch
python-firewall-0.6.3-2.el7_7.2.noarch
python-kitchen-1.1.1-5.el7.noarch
python-libs-2.7.5-86.el7.x86_64
python-linux-procfs-0.4.11-4.el7.noarch
python-schedutils-0.4-6.el7.x86_64
python-slip-0.4.0-4.el7.noarch
python-slip-dbus-0.4.0-4.el7.noarch
python-urlgrabber-3.10-9.el7.noarch
python2-dnf-4.0.9.2-1.el7_6.noarch
python2-hawkey-0.22.5-1.el7_6.x86_64
python2-libcomps-0.1.8-12.el7.x86_64
python2-libdnf-0.22.5-1.el7_6.x86_64
pyxattr-0.5.1-5.el7.x86_64
rpm-python-4.11.3-40.el7.x86_64
systemd-sysv-219-67.el7_7.2.x86_64
Complete!
Install new CentOS 8 kernel core. You can read our previous article, if you want to upgrade to latest Linux kernel.
[root@centos-7-server ~]# dnf install -y kernel-core
Extra Packages for Enterprise Linux Modular 8 - 2.5 kB/s | 10 kB 00:04
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
kernel-core x86_64 4.18.0-147.3.1.el8_1 BaseOS 25 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 25 M
Installed size: 58 M
Downloading Packages:
kernel-core-4.18.0-147.3.1.el8_1.x86_64.rpm 660 kB/s | 25 MB 00:39
--------------------------------------------------------------------------------
Total 649 kB/s | 25 MB 00:40
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : kernel-core-4.18.0-147.3.1.el8_1.x86_64 1/1
Running scriptlet: kernel-core-4.18.0-147.3.1.el8_1.x86_64 1/1
Verifying : kernel-core-4.18.0-147.3.1.el8_1.x86_64 1/1
Installed:
kernel-core-4.18.0-147.3.1.el8_1.x86_64
Complete!
Install Minimal and Core package groups on the server.
[root@centos-7-server ~]# dnf -y groupupdate "Core" "Minimal Install"
...
Installed:
dnf-plugin-spacewalk-2.8.5-11.module_el8.1.0+211+ad6c0bc7.noarch
dnf-plugins-core-4.0.8-3.el8.noarch
libsysfs-2.1.0-24.el8.x86_64
prefixdevname-0.1.0-6.el8.x86_64
rng-tools-6.6-2.el8.x86_64
sssd-common-2.2.0-19.el8.x86_64
sssd-kcm-2.2.0-19.el8.x86_64
yum-4.2.7-7.el8_1.noarch
libsss_autofs-2.2.0-19.el8.x86_64
libsss_sudo-2.2.0-19.el8.x86_64
sssd-nfs-idmap-2.2.0-19.el8.x86_64
python3-dnf-plugin-spacewalk-2.8.5-11.module_el8.1.0+211+ad6c0bc7.noarch
python3-hwdata-2.3.6-3.el8.noarch
python3-netifaces-0.10.6-4.el8.x86_64
python3-newt-0.52.20-9.el8.x86_64
python3-pyOpenSSL-18.0.0-1.el8.noarch
python3-rhn-client-tools-2.8.16-13.module_el8.1.0+211+ad6c0bc7.x86_64
python3-rhnlib-2.8.6-8.module_el8.1.0+211+ad6c0bc7.noarch
rhn-client-tools-2.8.16-13.module_el8.1.0+211+ad6c0bc7.x86_64
c-ares-1.13.0-5.el8.x86_64
libbasicobjects-0.1.1-39.el8.x86_64
libcollection-0.7.0-39.el8.x86_64
libdhash-0.5.0-39.el8.x86_64
libgudev-232-4.el8.x86_64
libini_config-1.3.1-39.el8.x86_64
libldb-1.5.4-2.el8.x86_64
libnfsidmap-1:2.3.3-26.el8.x86_64
libpath_utils-0.2.1-39.el8.x86_64
libref_array-0.1.5-39.el8.x86_64
libsss_certmap-2.2.0-19.el8.x86_64
libsss_idmap-2.2.0-19.el8.x86_64
libsss_nss_idmap-2.2.0-19.el8.x86_64
libtalloc-2.1.16-3.el8.x86_64
libtdb-1.3.18-2.el8.x86_64
libtevent-0.9.39-2.el8.x86_64
python3-asn1crypto-0.24.0-3.el8.noarch
python3-cffi-1.11.5-5.el8.x86_64
python3-cryptography-2.3-2.el8.x86_64
python3-dateutil-1:2.6.1-6.el8.noarch
python3-dnf-plugins-core-4.0.8-3.el8.noarch
python3-idna-2.5-5.el8.noarch
python3-librepo-1.10.3-3.el8.x86_64
python3-ply-3.9-7.el8.noarch
python3-pycparser-2.14-14.el8.noarch
sssd-client-2.2.0-19.el8.x86_64
Complete!
Reboot server to load new Linux Kernel.
[root@centos-7-server ~]# systemctl reboot
Verify Software Versions after Upgrade to CentOS 8:
After reboot, check version of installed Linux Kernel.
[root@centos-7-server ~]# uname -r
4.18.0-147.3.1.el8_1.x86_64
Check version of installed Apache web server.
[root@centos-7-server ~]# httpd -v
Server version: Apache/2.4.37 (centos)
Server built: Dec 23 2019 20:45:34
Check version of installed PHP programming language.
[root@centos-7-server ~]# php -v
PHP 7.2.11 (cli) (built: Oct 9 2018 15:09:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
Check version of installed MySQL server.
[root@centos-7-server ~]# mysql -V
mysql Ver 15.1 Distrib 10.3.17-MariaDB, for Linux (x86_64) using readline 5.1
Open URL http://centos-7-server.centlinux.com in a web browser.
Conclusion:
We have successfully upgraded our CentOS 7 server to CentOS 8 along with all the installed databases and applications.
Thank you for the post. I upgraded my Plex Media Serve using this post and it worked perfectly fine.
ReplyDeleteVery nice.
DeleteAll worked great, many thanks. But how in the world do you know this stuff? I've been a linux programmer for several years but the sys admin side of it still seems like total magic.
ReplyDeleteThanks for the Appreciation.
DeleteI get as far as removing the installed kernels, and then hit problems:
ReplyDelete# rpm -e `rpm -q kernel`
error: Failed dependencies:
kernel >= 3.10.0-384.el7 is needed by (installed) hypervvssd-0-0.34.20180415git.el7.x86_64
kernel >= 3.10.0-384.el7 is needed by (installed) hypervfcopyd-0-0.34.20180415git.el7.x86_64
kernel >= 3.10.0-384.el7 is needed by (installed) hypervkvpd-0-0.34.20180415git.el7.x86_64
kernel >= 2.6.32 is needed by (installed) lldpad-1.0.1-5.git036e314.el7.x86_64
kernel >= 3.10.0-1086.el7 is needed by (installed) kmod-kvdo-6.1.3.7-5.el7.x86_64
kernel(PDE_DATA) = 0x44f0d59d is needed by (installed) kmod-kvdo-6.1.3.7-5.el7.x86_64
kernel(___ratelimit) = 0x155f4108 is needed by (installed) kmod-kvdo-6.1.3.7-5.el7.x86_64
kernel(__bitmap_weight) = 0x4cbbd171 is needed by (installed) kmod-kvdo-6.1.3.7-5.el7.x86_64 etc.
Trying to continue on the basis that the installed kernel is needed, I get:
# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
Last metadata expiration check: 0:01:39 ago on Tue 28 Apr 2020 15:52:19 BST.
Error:
Problem: The operation would result in removing the following protected packages: kernel
Any ideas? This is on a test system, so not urgent.
Hi, You should remove the conflicting packages as mentioned in the next step of the above article and then continue the rest of the steps.
DeleteI've got the same problem - only with different "failed dependencies".
DeleteYou mean - in the case above - the packages hypervvssd-0-0.34.20180415git.el7.x86_64, hypervfcopyd-0-0.34.20180415git.el7.x86_64, .... should be removed?
Kind regards
Not all Linux servers are same, in fact each server has its own set of software packages.
DeleteTherefore, do not consider these failed dependencies as issues.
If you have observed a failed dependency, resolve it by using the advice in the above article.
This works well, I appreciate the work that went into it. Well detailed documentation, and very easy to follow.
ReplyDeleteI ran into an issue, because I had a great deal of software installed. I am putting my notes here, so others can get around the problem. It took some digging, and some trail and error.
You may run into issues with gdbm and gdbm-lib getting upgraded.
When you execute:
[root@centos-7-server ~]# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
You may get a cryptic error akin to:
Error: transaction check vs depsolve:
(gcc >= 8 with gcc < 9) is needed by annobin-8.78-1.el8.x86_64
rpmlib(RichDependencies) <= 4.12.0-1 is needed by annobin-8.78-1.el8.x86_64
(annobin if gcc) is needed by redhat-rpm-config-120-1.el8.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-120-1.el8.noarch
To diagnose the problem, try running: 'rpm -Va --nofiles --nodigest'.
You probably have corrupted RPMDB, running 'rpm --rebuilddb' might fix the issue.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
What you need to do is:
dnf install gdbm gdbm-libs --best --allowerasing
You will get a list of package conflicts.
Remove the indicated RHEL7 packages, and then issue again:
dnf install gdbm gdbm-libs --best --allowerasing
Then, execute the upgrade again:
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
The upgrade should go to completion.
Just so you know, you may have to install some third party software.
Thanks for sharing your experience. This will surely helpful for others.
DeleteHallo,
ReplyDeleteit is not possible to copy the command under "Start system upgrade by using following command.", because it does not fit in the box on the website.
Hi,
DeletePlease use the horizontal scroll bar at the bottom of that box.
Hi Ahmer, I followed these steps by now my grub does does not find the right image to boot. How should edit the entries to accommodate this new build out? Many thanks!
ReplyDeleteI wonder how do you manage to break the GRUB?
DeleteWell, no problem you can still recover it by following the steps in our previous article: Recover GRUB Bootloader in CentOS 8.
If problem persists, please contact me at our Facebook page.
I met the same issue.
DeleteVmlinuz and initrd files were missing on /boot
Removing and installing again the kernel-core before the first reboot worked for me
Thanks for your instructions.
ReplyDeleteFor a fresh Amazon Lightsail CentOS 7 image, this step failed for me:
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
It said there were conflicts with an existing package, python36-rpmconf-1.0.22-1.el7.noarch, so I removed that with
dnf remove python36-rpmconf-1.0.22-1.el7.noarch
It continued OK from there, except for the step with
dnf -y groupupdate "Core" "Minimal Install"
That said installing yum-4.2.7-7.el8_1.noarch failed, but I guess since dnf is installed, it's not a big deal.
Thanks for sharing your experience. It will be helpful for readers.
DeleteHi, I got to the part where you execute "dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync" and it failed with the error "Problem: The operation would result in removing the following protected packages: kernel".
ReplyDeleteHeeelllppppppp
Thanks in anticipation :-)
All the kernels must be removed before executing this step.
DeleteGo to previous step and remove installed kernels and then continue.
I am also running into this problem.
DeleteIn my case I am getting:
[root@system admin]# rpm -e `rpm -q kernel`
error: Failed dependencies:
kernel >= 2.6.32 is needed by (installed) lldpad-1.0.1-5.git036e314.el7.x86_64
kernel >= 2.6.32 is needed by (installed) lldpad-1.0.1-5.git036e314.el7.x86_64
[root@system admin]# dnf remove -y lldpad-1.0.1-5.git036e314.el7.x86_64
Error:
Problem: The operation would result in removing the following protected packages: kernel
Seems to be a catch-22. Not sure how to force remove the kernel in this situation.
Thanks.
Try following command.
Deleterpm -e --nodeps lldpad-1.0.1-5.git036e314.el7.x86_64
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
ReplyDeleteLast metadata expiration check: 0:04:49 ago on Tue 13 Oct 2020 12:45:13 PM IST.
Error:
Problem: The operation would result in removing the following protected packages: dnf
Kindly help on this error. I tried removing dnf from /etc/dnf/protected.d/ and /etc/yum/protected.d/. But no luck
Please contact us on our Facebook Page. I need to know what version you are upgrading to and from? Also is there any error in previous steps?
DeleteExcellent guide. Thank you!
ReplyDeleteReally nice guide, but ...
ReplyDeleteTrying to upgrade 7.8 to latest, but requiring to access the repos via proxy. Had yum working (proxy=... in /etc/yum.conf, I think).
However, after removing yum, dnf makecache does not do anything:
# dnf makecache
Extra Packages for Enterprise Linux 7 - x86_64 0.0 B/s | 0 B 00:00
CentOS-7 - Base 0.0 B/s | 0 B 00:00
CentOS-7 - Updates 0.0 B/s | 0 B 00:00
CentOS-7 - Extras 0.0 B/s | 0 B 00:00
Failed to synchronize cache for repo 'extras', ignoring this repo.
Metadata cache created.
http_proxy (et al) are correctly set in the env. Added "proxy=http://my-proxy:8080" to /etc/dnf/dnf.conf, but still no better metadata cache.
This leads to the following upgrade:
# dnf upgrade -y
CentOS-7 - Extras 0.0 B/s | 0 B 00:00
Failed to synchronize cache for repo 'extras', ignoring this repo.
Last metadata expiration check: 0:01:50 ago on Thu 22 Oct 2020 12:22:29 PM CEST.
Dependencies resolved.
Nothing to do.
Complete!
Not having yum anymore and dnf not working leaves the system in a bad shape :-\
Forget my last comment ... I misinterpreted the 'Nothing to do' as an error of the upgrade while it was just telling me that my Centos7 was up-to-date. Reading again and just continuing worked well (after adding the proxy to /etc/dnf/dnf.conf).
ReplyDelete[root@centos8-testing ~]# dnf --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
ReplyDeletewarning: /var/cache/dnf/epel-6519ee669354a484/packages/rpmconf-1.0.21-1.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Extra Packages for Enterprise Linux 8 - x86_64 0.0 B/s | 0 B 00:00
Importing GPG key 0x2F86D6A1:
Userid : "Fedora EPEL (8) "
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
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
file /usr/sbin/pidof from install of procps-ng-3.3.15-1.el8.x86_64 conflicts with file from package sysvinit-tools-2.88-14.dsf.el7.x86_64
file /usr/bin/last from install of util-linux-2.32.1-22.el8.x86_64 conflicts with file from package sysvinit-tools-2.88-14.dsf.el7.x86_64
file /usr/bin/mesg from install of util-linux-2.32.1-22.el8.x86_64 conflicts with file from package sysvinit-tools-2.88-14.dsf.el7.x86_64
file /usr/bin/wall from install of util-linux-2.32.1-22.el8.x86_64 conflicts with file from package sysvinit-tools-2.88-14.dsf.el7.x86_64
file /usr/share/man/man1/last.1.gz from install of util-linux-2.32.1-22.el8.x86_64 conflicts with file from package sysvinit-tools-2.88-14.dsf.el7.x86_64
file /usr/share/man/man1/mesg.1.gz from install of util-linux-2.32.1-22.el8.x86_64 conflicts with file from package sysvinit-tools-2.88-14.dsf.el7.x86_64
file /usr/share/man/man1/wall.1.gz from install of util-linux-2.32.1-22.el8.x86_64 conflicts with file from package sysvinit-tools-2.88-14.dsf.el7.x86_64
file /usr/lib/python3.6/site-packages/rpmconf/__pycache__/__init__.cpython-36.opt-1.pyc from install of python3-rpmconf-1.0.21-1.el8.noarch conflicts with file from package python36-rpmconf-1.0.22-1.el7.noarch
file /usr/lib/python3.6/site-packages/rpmconf/__pycache__/__init__.cpython-36.pyc from install of python3-rpmconf-1.0.21-1.el8.noarch conflicts with file from package python36-rpmconf-1.0.22-1.el7.noarch
file /usr/lib/python3.6/site-packages/rpmconf/__pycache__/rpmconf.cpython-36.opt-1.pyc from install of python3-rpmconf-1.0.21-1.el8.noarch conflicts with file from package python36-rpmconf-1.0.22-1.el7.noarch
file /usr/lib/python3.6/site-packages/rpmconf/__pycache__/rpmconf.cpython-36.pyc from install of python3-rpmconf-1.0.21-1.el8.noarch conflicts with file from package python36-rpmconf-1.0.22-1.el7.noarch
file /usr/share/man/man3/rpmconf.3.gz from install of python3-rpmconf-1.0.21-1.el8.noarch conflicts with file from package python36-rpmconf-1.0.22-1.el7.noarch
Error Summary
-------------
Observing these errors at the moment. Any solution on this !!
You should remove the conflicting packages first.
DeleteNever mind solved it by removing conflicted packages. :-)
ReplyDeleteThank you for the post. I upgraded my system from cento7 to centos8 and it worked perfectly fine
I ended up in a sistuation where the removal would result in removal of dnf. So it the upgarde was not possible.
ReplyDeleteI used a fresh minimal Centos 7 in order to be sure no extra none Centos 7 packages were installed.
Please discuss it with me on our Facebook Page.
DeleteThe filenames listed in the step "Upgrading Yum Repositories from CentOS 7 to CentOS 8:" no longer exist; changing the command to their newer versions causes "not installed, cannot upgrade" messages. Do you have a solution? Thanks.
ReplyDeleteTry to install following packages and confirm if it work for you.
Delete# dnf upgrade -y http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/{centos-gpg-keys-8-2.el8.noarch.rpm,centos-linux-release-8.3-1.2011.el8.noarch.rpm,centos-linux-repos-8-2.el8.noarch.rpm}