步骤
实现此案例需要按照如下步骤进行。
步骤一:创建/CentOS6.5DVD目录
命令操作如下所示:
[root@svr5 ~]# mkdir /CentOS6DVD
[root@svr5 ~]# ls -ld /CentOS6DVD/
drwxr-xr-x. 2 root root 4096 5月 11 15:12 /CentOS6DVD/
[root@svr5 ~]#
步骤二:挂载光盘ISO镜像
命令操作如下所示:
[root@svr5 ~]#mount -o loop /ISO/CentOS-6.7*1.iso /CentOS6DVD/
[root@svr5 ~]# ls /CentOS6DVD/
EFI Packages RELEASE-NOTES-pa-IN.html
EULA README RELEASE-NOTES-pt-BR.html
EULA_de RELEASE-NOTES-as-IN.html RELEASE-NOTES-ru-RU.html
EULA_en RELEASE-NOTES-bn-IN.html RELEASE-NOTES-si-LK.html
EULA_es RELEASE-NOTES-de-DE.html RELEASE-NOTES-ta-IN.html
EULA_fr RELEASE-NOTES-en-US.html RELEASE-NOTES-te-IN.html
EULA_it RELEASE-NOTES-es-ES.html RELEASE-NOTES-zh-CN.html
EULA_ja RELEASE-NOTES-fr-FR.html RELEASE-NOTES-zh-TW.html
EULA_ko RELEASE-NOTES-gu-IN.html repodata
EULA_pt RELEASE-NOTES-hi-IN.html ResilientStorage
EULA_zh RELEASE-NOTES-it-IT.html RPM-GPG-KEY-redhat-beta
GPL RELEASE-NOTES-ja-JP.html RPM-GPG-KEY-redhat-release
HighAvailability RELEASE-NOTES-kn-IN.html ScalableFileSystem
images RELEASE-NOTES-ko-KR.html Server
isolinux RELEASE-NOTES-ml-IN.html TRANS.TBL
LoadBalancer RELEASE-NOTES-mr-IN.html
media.repo RELEASE-NOTES-or-IN.html
[root@svr5 ~]#
步骤三:配置Yum客户端配置文件
命令操作如下所示:
[root@svr5 /]# cd /etc/yum.repos.d/
[root@svr5 yum.repos.d]# cp rhel-source.repo centos6.repo
[root@svr5 yum.repos.d]# vim centos6.repo
[rhel-CentOS]
name=CentOS 6
baseurl=file:///CentOS6DVD
enabled=1
gpgcheck=0 //必须有此字段,若不检测软件签名则“gpgkey”配置可不写
[root@svr5 yum.repos.d]# yum repolist
步骤四:安装常用软件lftp,此软件为访问ftp的客户端软件
命令操作如下所示:
[root@svr5 /]# yum -y install lftp
步骤五:利用/etc/fstab文件,实现开机自动挂载
命令操作如下所示:
[root@svr5 /]# tail -n 1 /etc/fstab
/ISO/CentOS-6.7*.iso /CentOS6DVD iso9660 defaults,loop 0 0
[root@svr5 /]#