- 创建挂载光盘的路径
mkdir -p /mnt/rheliso
- 挂载光盘
1)将光驱内的光盘挂载到系统
mount /dev/cdrom /mnt/rheliso
2)如果是ISO文件,那么将ISO文件先上传到服务器,然后再挂载
mount -t iso9660 -o loop /home/linux1/sorft/rhel-server-6.4-x86_64-dvd.iso /mnt/rheliso/
【查看是否挂载成功】
df -h
- 配置本地为yum源
cd /etc/yum.repos.d/ cp rhel-source.repo rhel-source.repo_back vim rhel-source.repo
[需要修改的内容如下]
baseurl=file:///mnt/rheliso/Server enabled=1 gpgcheck=0
- 验证
yum clean yum list
如下图,能把软件包列出来就成功了
- CENTOS 6.5 配置
[base] name=CentOS-$releasever - Base baseurl=file:///mnt/rheliso enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
标签:光盘,mnt,yum,rhel,redhad,挂载,rheliso From: https://blog.51cto.com/u_16110904/7100061