How to set up VPS

How to upgrade from CentOS 7 to CentOS 8 and its merit

Merit of upgrading to CentOS 8 from CentOS 7

Performance up

It will give you better performance.

In my case, when I checked DigitalOcean’s standard plan in Dec/2019, it yielded unixbench score from 477 to 603 using CentOS7, but after I upgraded the instance’s OS to CentOS 8, it yielded unixbench score 801, which means more than 30% performance up.

In second try using different instsance, unixbench score changed from 605 to 860.
The difference is hard to ignore.
So if you want to use CentOS on DigitalOcean, you must upgrade CentOS from 7 to 8.

Longer support

It has more future support deadline
CentOS 7: 2024-06-30
CentOS 8: 2029-05

Bundled software have newer version

Here are some of main software’s cases.

apache 2.4.6 2.4.37
berkeleydb 5.3.21 5.3.28
gcc 4.8.5 8.2.1
git 1.8.3 2.18.1
kernel 3.10.0-957.27.2.el7 4.18.0-80.11.2.el8
mariadb 5.5.64 10.3.11
Perl 5.16.3 5.26.3
PHP 5.4.16 7.2
PostgreSQL 9.2.24 10.6
Python 3.6.8 3.6
Ruby 2.0.0 2.5.3

Some key tools are altered

yum => dnf

Then how to upgrade to CentOS8?

Considering above merit, I think you want to upgrade to CentOS8 but there are still many VPSs which are not providing CentOS8 like DigitalCcean.

And CentOS is not providing tools to upgrade to CentOS8.

So here I write down how you can upgrade to CentOS8


I don’t recommend you to make existing system upgrade to CentOS 8 to avoid risk.

Procedure of upgrading to CentOS 8 from CentOS7

Copy and paste following commands using root.

yum -y update;
yum -y install epel-release;
yum -y install yum-utils;
yum -y install rpmconf;
rpmconf -a;

Just type return (=default values) to the questions by “rpmconf -a”

Copy and paste following commands using root again.

# If below url becomes not found, please find another url where you can download the package through google's search result. #

package-cleanup --leaves;
package-cleanup --orphans;
yum -y install dnf;
dnf -y remove yum yum-metadata-parser;
rm -Rf /etc/yum;
dnf upgrade -y;
dnf -y upgrade $C8URL;
dnf -y upgrade;
dnf clean all;
rpm -e `rpm -q kernel`;
rpm -e --nodeps sysvinit-tools;
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync;
dnf -y install kernel-core;
dnf -y groupupdate "Core" "Minimal Install" --allowerasing;

For verification, if you type

cat /etc/redhat-release;

you can seed upgraded OS info.

CentOS Linux release 8.0.1905 (Core) 

Confirm current kernel

uname -a;

Then you will see 3.xx

Linux 3.10.0-957.27.2.el7.x86_64 #1 SMP Mon Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

You have to reboot system for reflecting the upgrading to kernel, so let’s reboot.

shutdown -r now;

Log in rebooted system and confirm version of kernel again.

uname -a;

Here you are.

Linux 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

Now you succeeded in upgrading CentOS 7 to CentOS 8.
After some more adjustment, let’s create snapshot to enable you to skip same procedure for creating CentOS 8 from zero and make use of the snapshot to make other CentOS 8 instances.

How to upgrade to CentOS 8.1

Please read another article for it.

What is VPS?
  1. CPUs of VPS : How to judge whether it is good or not

OS & Virtual Environment
  1. How to switch to AlmaLinux from CentOS(RHE’s clone)
  2. How to upgrade to CentOS 8 from CentOS 7 and its merit
  3. Benchmark of performance degradation by Docker's overhead with knowhow of installation&usage of docker

  1. MariaDB vs MySQL vs PostgreSQL: Flowchart to choose best RDB

Programming Language
  1. How to install PHP8