將光盤文件寫入系統(tǒng)中
使用
mount -t iso9660 -o loop 此處填寫文件路徑 此處填寫掛在路徑
進(jìn)入/etc/yum.repo.d文件夾內(nèi) 查库。將base文件隨意增加一個(gè)拓展名
$ mv Centos-Base.repo Cent-Base.repo.a
$ vi local.repo
輸入以下內(nèi)容
[local]
name=local
baseurl=file:///media/ISO #舉個(gè)例子我把光盤掛在了這個(gè)路徑下
enabled=1
gpgcheck=0
保存 yum clean
yum makecache