mount /dev/sr0 /mnt 或 mount -o loop rhel6.4.iso /mnt/etc/yum.repos.d/rhel-local.repo:[rhel-base]
name=RHEL 6.4 Base
baseurl=file:///mnt
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
yum clean all && yum makecache → yum install package -y 即可離線安裝 (自動解決相依)。/mnt。vsftpd,確認 anonymous_enable=YES (預設開啟)。mkdir -p /var/ftp/pub/rhel6.4cp -rf /mnt/* /var/ftp/pub/rhel6.4rm -f /var/ftp/pub/rhel6.4/*.htmlrhel-local.repo:[RHEL64]
name=RHEL 6.4 FTP
baseurl=ftp://133.1.5.18/pub/rhel6.4
enabled=1
gpgcheck=1
gpgkey=ftp://133.1.5.18/pub/rhel6.4/RPM-GPG-KEY-redhat-release
.repo 至 /etc/yum.repos.d/ 即可使用 FTP 來源安裝。yum install pkg -yyum remove pkg -yyum list | grep pkg關鍵優勢: yum 自動計算相依關係,避免 RPM 手動解決依賴地獄。FTP 模式適合無光碟機、大量節點的離線叢集環境。