项目中总用光盘做为yum源,帮此记录一下:
当前linux版本 rhel6.6
前提
mount DVD光盘到/mnt 因为配置时候路径名里面不能有空格,否则不能识别
[root@LiuZhen mnt]# mount /dev/sr0 /mnt
在/etc/yum.repos.d目录创建mnt.repo
[root@localhost yum.repos.d]# cat mnt.repo
[MNT]
name=isofile
baseurl=file:///mnt
enabled=1
gpgcheck=0
gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release
[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d
使用yum list进行测试
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7490392/viewspace-1846407/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7490392/viewspace-1846407/