從Centos7升級到Centos8的教程(圖文詳解)
如果在正式環(huán)境升級,請做好數(shù)據(jù)備份以及重要配置備份!因為升級會造成一部分應(yīng)用被卸載。
1.安裝epel源
yum -y install epel-release

2.安裝rpmconf和yum-utils
yum -y install rpmconf yum-utils

3.執(zhí)行rpmconf ,如果出現(xiàn)一些提示,請輸入Y和回車繼續(xù),如果沒提示繼續(xù)第四步操作
rpmconf -a

4.安裝dnf
yum -y install dnf

5.移除yum和yum-metadata-parser
dnf -y remove yum yum-metadata-parser

6.刪除/etc/yum目錄
rm -rf /etc/yum

7.安裝Centos8的源和升級epel源
dnf -y upgrade dnf -y upgrade http://mirrors.163.com/centos/8.0.1905/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm dnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm dnf clean all

8.卸載centos7的內(nèi)核
rpm -e --nodeps `rpm -q kernel`

9.升級到centos8,這一步一般會報錯,如果沒有報錯請進行第10步操作
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync

發(fā)現(xiàn)報錯之后先卸載類似于圖上from package后面的包名
rpm -e --nodeps sysvinit-tools-2.88-14.dsf.el7.x86_64 rpm -e --nodeps python-inotify-0.9.4-4.el7.noarch rpm -e --nodeps adwaita-qt5-1.0-1.el7.x86_64 rpm -e --nodeps pycairo-1.8.10-8.el7.x86_64

卸載完后再次執(zhí)行升級
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
10.執(zhí)行rpmconf,會出現(xiàn)如下界面,一直輸入Y和回車即可
rpmconf -a

11.重啟機器
reboot
總結(jié)
以上所述是小編給大家介紹的從Centos7升級到Centos8的教程,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對本站網(wǎng)站的支持!
如果你覺得本文對你有幫助,歡迎轉(zhuǎn)載,煩請注明出處,謝謝!
版權(quán)聲明:本站文章來源標注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學習參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。
關(guān)注官方微信