有时候需要从光盘里安装packages.
这就需要先配置yum的repos,让它从本地光盘里找packages.
挂载RHEL6系统光盘
首先挂载RHEL6光盘。
如果是硬盘上的iso文件,比如光盘路径是/tmp/rhel6.iso 那么执行下面命令将iso挂载到/mnt
# mount -o loop /tmp/rhel6.iso /mnt
如果是光盘(或者是从虚拟机插入),执行下面命令将光盘挂载到/mnt
# mount /dev/sr0 /mnt
挂载后,应该能看到/mnt下有光盘的内容。
# ls /mnt/ EFI EULA_pt README RELEASE-NOTES-it-IT.html RELEASE-NOTES-ru-RU.html RPM-GPG-KEY-redhat-release EULA EULA_zh RELEASE-NOTES-as-IN.html RELEASE-NOTES-ja-JP.html RELEASE-NOTES-si-LK.html ScalableFileSystem EULA_de GPL RELEASE-NOTES-bn-IN.html RELEASE-NOTES-kn-IN.html RELEASE-NOTES-ta-IN.html Server EULA_en HighAvailability RELEASE-NOTES-de-DE.html RELEASE-NOTES-ko-KR.html RELEASE-NOTES-te-IN.html TRANS.TBL EULA_es images RELEASE-NOTES-en-US.html RELEASE-NOTES-ml-IN.html RELEASE-NOTES-zh-CN.html EULA_fr isolinux RELEASE-NOTES-es-ES.html RELEASE-NOTES-mr-IN.html RELEASE-NOTES-zh-TW.html EULA_it LoadBalancer RELEASE-NOTES-fr-FR.html RELEASE-NOTES-or-IN.html repodata EULA_ja media.repo RELEASE-NOTES-gu-IN.html RELEASE-NOTES-pa-IN.html ResilientStorage EULA_ko Packages RELEASE-NOTES-hi-IN.html RELEASE-NOTES-pt-BR.html RPM-GPG-KEY-redhat-beta