How to set up VPS

How to upgrade to CentOS 8.1 & use latest packages

How to upgrade to CentOS8.1

If you want to upgrade to CentOS 8.1 from CentOS7.x, then please read this article.

If you are using CentOS 8.0, then type

dnf -y update;

Then type following command for confirmation.

cat /etc/redhat-release;

Result

CentOS Linux release 8.1.1911 (Core) 

Then restart the server to update kernel.

shutdown -r now;

From CentOS 8.1, you can apply patch to kernel without rebooting even if you cannot reboot the server.

kpatch can be used in following way.

yum install "kpatch-patch = $(uname -r)"

Please read detail at Redhat’s article.

You can also check the detail of changes of CentOS 8.1 at Redhat Linux 8.1’s page.


How to use latest module on CentOS 8.1

Ruby, PHP, nginx, node.js were updated in CentOS 8.1.

PHP 7.2 => 7.3
Ruby 2.5.x => 2.6
Node.js 10.16 => 12
nginx 1.14 => 1.16

But you cannot use latest version just typing `dnf -y update`

You have to change software’s installation stream explicitly.
Here rare procedures for each software.
Updating software leads to better performance and less infrastructure cost.
For example, in the case of PHP 7.3, the performance is 10 better than PHP 7.2, so it is worthwhile updating them.


nginx

CMD=nginx;
NEWVER=1.16;
$CMD -v;
yum -y distro-sync;
yum -y module reset;
yum -y module reset $CMD;
yum -y module enable $CMD:$NEWVER;
yum -y distro-sync;
yum -y install $CMD;
$CMD -v;

node.js

CMD=nodejs;
NEWVER=12;
$CMD -v;
yum -y distro-sync;
yum -y module reset;
yum -y module reset $CMD;
yum -y module enable $CMD:$NEWVER;
yum -y distro-sync;
yum -y install $CMD;
$CMD -v;

Ruby

CMD=ruby;
NEWVER=2.6;
$CMD -v;
yum -y distro-sync;
yum -y module reset;
yum -y module reset $CMD;
yum -y module enable $CMD:$NEWVER;
yum -y distro-sync;
yum -y install $CMD;
$CMD -v;

PHP

CMD=php;
NEWVER=7.3;
$CMD -v;
yum -y distro-sync;
yum -y module reset;
yum -y module reset $CMD;
yum -y module enable $CMD:$NEWVER;
yum -y distro-sync;
yum -y install $CMD;
$CMD -v;