设置本地磁盘为yum源

1. 挂载DVD
$su
#mkdir /mnt/Fedora-dvd
#mount -t iso9660 /dev/cdrom /mnt/Fedora-dvd
2. 设置yum
#cd /etc/yum.repo.d/
#cp Fedora.repo dvd.repo
#vim dvd.repo
修改dvd.repo里的内容如下:
[Fedora-dvd]
name=Fedora DVD $releasever - $basearch
baseurl=file:///mnt/Fedora-dvd/
enable=1
gpgcheck=1
gpgkey=file:///mnt/Fedora-dvd/RPM-GPG-KEY-fedora
3. 接下来就可以用了
#yum search git

你可能感兴趣的:(设置本地磁盘为yum源)