redhat6.6配置光盘为yum源

项目中总用光盘做为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进行测试
请使用浏览器的分享功能分享到微信等