很多人希望将yum仓库配到本地,便于以后的安装
我实践了一种方法供参考:
首先将光盘的Server目录挂到本地的某个路径上,如 /mnt/dvd
dvd光盘的设备名应该是/dev/hdc
挂载命令为 mount /dev/hdc /mnt/dvd
在/etc/yum.repos.d下建立一个文件,文件名可以随意,但后缀必须是
内容为repo, 如local.repo
内容为:
[local]
name=localdvd
baseurl=file:///mnt/dvd/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
保存,
现在你就可以使用yum install package 来安装需要的软件包了。