Điều kiện tiên quyết
Bạn sẽ cần một máy chủ CentOS 7 với quyền root.

Installing EPEL Repository

yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmyum -y install rpmconf yum-utilsrpmconf -apackage-cleanup --leavespackage-cleanup --orphans

Installing DNF Package Manager

yum -y install dnfdnf -y remove yum yum-metadata-parserrm -Rf /etc/yumdnf -y upgradednf -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.rpmdnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpmdnf clean allrpm -e `rpm -q kernel`rpm -e --nodeps sysvinit-tools

Upgrading to CentOS 8

dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-syncrpmconf -arpm -e kernel-corednf -y install kernel-core

Verify that grub is updated and in the right location:

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

Installing Minimal Package:

dnf -y groupupdate "Core" "Minimal Install"

Verify CentOS version:

cat /etc/centos-release

reboot
 
Tóm lại
Bạn đã nâng cấp thành công từ CentOS 7 lên CentOS 8 bằng trình quản lý gói dnf và giờ bạn đã có bản phát hành mới nhất của CentOS 8.

Thủ Thuật Hay

470 Blog posts

Related post