Cara Upgrade CentOS 7 ke CentOS 8

Hello kawan superuser, kali ini saya membahas tentang bagaimana cara upgrade dari CentOS 7 ke CentOS 8. Server yang saya gunakan dalam tutorial ini adalah VPS CentOS 7 yang masih kosong, belum terinstall aplikasi tambahan sama sekali.

Install EPEL repository.

[INPUT]

1 yum install epel-repository -y

Install yum-utils.

[INPUT]

1 yum install yum-utils

Resolves RPM packages.

[INPUT]

1 2 yum install rpmconf -y rpmconf -a

Bersihkan semua packages yang tidak dibutuhkan.

[INPUT]

1 2 package-cleanup –leaves package-cleanup –orphans

Install dnf package manager yang menjadi default package manager di CentOS 8 sebagai pengganti yum.

[INPUT]

1 yum install dnf -y

Remove yum package manager.

[INPUT]

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

Upgrade system yang sedang berjalan.

[INPUT]

1 dnf upgrade

Install CentOS 8 release packages.

[INPUT]

1 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.rpm

Upgrade EPEL repository.

[INPUT]

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

Bersihkan file temporary.

[INPUT]

1 dnf clean all

Remove kernel lama.

[INPUT]

1 rpm -e `rpm -q kernel`

Remove conflicting packages.

[INPUT]

1 rpm -e –nodeps sysvinit-tools

Jalankan upgrade CentOS 8.

[INPUT]

1 dnf -y –releasever=8 –allowerasing –setopt=deltarpm=false distro-sync

Install kernel core CentOS 8.

[INPUT]

1 dnf -y install kernel-core

Install minimal package CentOS 8.

[INPUT]

1 dnf -y groupupdate “Core” “Minimal Install”

Cek versi CentOS yang sedang berjalan.

[INPUT]

1 2 3 cat /etc/redhat-release   CentOS Linux release 8.0.1905 (Core)

Cek versi CentOS dengan redhat-release

Cek versi CentOS pakai hostnamectl.

[INPUT]

1 2 3 4 5 6 7 8 9 10 11 [root@lab-centos ~]# hostnamectl    Static hostname: lab-centos          Icon name: computer-vm            Chassis: vm         Machine ID: 07386a8ba92e474aaafe49f8535986d8            Boot ID: d94fce759ad9489d99a3b1298edc0148     Virtualization: kvm   Operating System: CentOS Linux 8 (Core)        CPE OS Name: cpe:/o:centos:centos:8             Kernel: Linux 4.18.0-80.11.2.el8_0.x86_64       Architecture: x86-64

Cek versi CentOS dengan hostnamectl

Selamat mencoba 🙂

Leave a Reply

Your email address will not be published.