挂载本地iso光盘镜像、配置yum软件仓库
1 上传iso文件
使用xftp上传rhel6.4系统光盘镜像到/software
[root@rhel64 ~]# cd /software/
[root@rhel64 software]# ls -lh
为方便使用,重命名光盘镜像文件
[root@rhel64 software]# mv rhel-server-6.4-x86_64-dvd.iso rhel64.iso
[root@rhel64 software]# ls -lh
2 创建挂载点
[root@rhel64 ~]# mkdir /mnt/yum
[root@rhel64 ~]# ls -ld /mnt/yum
3 临时挂载iso文件
[root@rhel64 ~]# df -Th
直接执行mount命令,提示使用-o loop选项
[root@rhel64 ~]# mount /software/rhel64.iso /mnt/yum/
[root@rhel64 ~]# mount -o loop /software/rhel64.iso /mnt/yum
[root@rhel64 ~]# df -Th
卸载
[root@rhel64 ~]# umount /mnt/yum
[root@rhel64 ~]# df -Th
4 实现iso文件开机自动挂载
编写/etc/fstab文件,追加写入信息
/software/rhel64.iso /mnt/yum iso9660 loop 0 0
[root@rhel64 ~]# vi /etc/fstab
[root@rhel64 ~]# grep iso /etc/fstab