挂载本地光盘
- vmware设置安装镜像
- 挂载
mount #查看挂载
mkdir /mnt/cdrom #创建挂载目录
mount -t iso9660 /dev/cdrom /mnt/cdrom #将/dev/cdrom 挂载到/mnt/cdrom
#iso9660代表光盘或光盘镜像
- 卸载
umount /mnt/cdrom #必须退出挂载目录操作
配置本地源
创建本地源配置文件
- cd /etc/yum.repos.d/
- vi local.repo,配置内容如下
[local-Server]
name=localServer
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=0
[local-ha]
name=localHa
baseurl=file:///mnt/cdrom/HighAvailability
enabed=1
gpgcheck=0
[local-lb]
name=localLB
baseurl=file:///mnt/cdrom/LoadBalancer
enabled=1
gpgcheck=0
[local-RS]
name=localRS
baseurl=file:///mnt/cdrom/ResilientStorage
enabled=1
gpgcheck=0
来源:oschina
链接:https://my.oschina.net/u/1264515/blog/184182