Home / How To / How to upgrade Centos 7 to 8

How to upgrade Centos 7 to 8



CentOS 8 released September 23, 2019 ISO is available on the official site and can be installed in many ways, unfortunately the minimal version is not yet available (or at all) as SysAdmin, it was my favorite build about 800 Mb compared to 6 Go , in this tutorial I will show you how to upgrade from Centos 7 to Centos 8

Please note that this is not an official upgrade so it is not suitable for a production environment.

CentOS 7 to 8 Upgrade

Download and install the EPEL archive:

  yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch. rpm Chapter1
9659006achteInstall yum- utils:

  yum -y install rpmconf yum-utils 

Resolve rpm package:

  rpmconf -a 

result:

  Result of rpmconf command

Keep default.

We do not need cleanup packages.

  package-cleanup - leaves 
package-cleanup - orphans

result:

<img src = "https://www.howtoforge.com/images/how_to_upgrade_centos_7_core_to_8/pakage-cleanup.png" alt = "Package cleanup [19659017] Install a RPM-based software DNF package handler:

  yum -y install dnf  

Remove yum package manager:

  dnf -y remove yum yum-metadata-parser 
rm -Rf / etc / yum

Update a system with DNF:

  sudo dnf-y upgrade  

Install the new version:

  dnf-y upgrade http: //mirror.bytemark. co.uk/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpmebrit19659006achteUpgrade EPEL archive: 

  dnf-y upgrade https: //dl.fedoraproject.org / pub / EPEL / EPEL-release-latest-8.noarch.rpm

Cleaning of entire temporary files stored in the repository

  dnf cleans all 

remove cores

  rpm -e `rpm -q kernel` 

Remove conflicting

  rpm -e - nodeps sysvinit tools 

Now we launch the upgrade

  dnf -y - releasever = 8 --allowing --setopt = deltarpm = false distro-sync 

Processing new configuration:

  rpmconf -a 

Confirm new kernel-core is correctly installed:

  rpm -e kernel-core 
dnf -y install kernel-core

Confirm that grub is up-to-date and in correct place

  ROOTDEV = `ls / dev / * en | head -1 & # 39 ;;
echo "Detected root as $ ROOTDEV ..."
grub2-install $ ROOTDEV 

Install Minimal package:

  dnf -y groupupdate "Core" "Minimal install" 

Check Centos version:

  cat / etc / centos-release  

 CentOS successfully upgraded

 CentOS Boot screen


Source link