RHCE7版本中配置本地yum源
1、为DVD创建一个挂载目录
[root@localhost ~]# mkdir -pv /media/cdrom/
2、挂载DVD
[root@localhost ~]# mount /dev/cdrom /media/cdrom/
3、配置本地yum源
[root@localhost ~]#vim /etc/yum.repos.d/rhel_dvd.repo
[rhel_dvd]
name=rhel_dvd
baseurl=
enabled=1
gpgcheck=0
4、清除原有的yum信息
[root@localhost ~]# yum clean all
5、
检查DVD软件列表
[root@localhost yum.repos.d]# yum list
b、永久挂载:
[root@localhost ~]#vim /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri Mar 20 09:35:09 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/rhel-root / xfs defaults 1 1
UUID=70ade7ed-cadf-4be6-adf1-28598241d237 /boot xfs defaults 1 2
/dev/mapper/rhel-swap swap swap defaults 0 0
/dev/sdb1 /newdisk ext4 defaults 0 0
/dev/cdrom /media/cdrom/ iso9660 defaults 1 1
校验是否正确
[root@localhost ~]#mount -a
阅读(1394) | 评论(0) | 转发(0) |