using-dvd-iso-to-update-yum-centos-8



mount -t iso9660 -o loop ~wkh/CentOS-Stream-8-x86_64-20201030-dvd1.iso /media/CentOS/
cd /etc/yum.repos.d/
vi CentOS-Stream-Media.repo

-----

# CentOS-Stream-Media.repo
#
# You can use this repo to install items directly off the installation media.
# Verify your mount point matches one of the below file:// paths.

[media-baseos]
name=CentOS Stream $releasever - Media - BaseOS
baseurl=file:///media/CentOS/BaseOS
#        file:///media/cdrom/BaseOS
#        file:///media/cdrecorder/BaseOS
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[media-appstream]
name=CentOS Stream $releasever - Media - AppStream
baseurl=file:///media/CentOS/AppStream
#        file:///media/cdrom/AppStream
#        file:///media/cdrecorder/AppStream
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

#ln -s /run/media/wkh/CentOS-Stream-8-x86_64-dvd /media/CentOS

更改到其他mirror版本時,執行以下重建yum資料庫

su -
yum clean all 
rpm --rebuilddb
yum update

留言

這個網誌中的熱門文章

10.29 Slow HTTP Denial of Service Attack (Slowloris)

在CentOS 8 Stream安裝NTP Client與設定時區

Update Pattern of TrendMicro AntiVirus Software - ServerProtect