Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

RedHat 掛載安裝鏡像建立本地 yum 來源:掛載 ISO、編輯 .repo、驗證安裝 gcc/telnet 實測

編輯:Linux 系統常見問題解答

操作流程

  1. 虛擬機管理員將安裝 ISO 掛載至 /media。
  2. root 登入,進入 /etc/yum.repos.d/,編輯 rhel-source.repo (或新建 local.repo):
[rhel-local]
name=RHEL Local Repository
baseurl=file:///media
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  1. yum clean all && yum makecache 建立快取。
  2. yum list 驗證套件列表。
  3. yum -y install gcc* telnet* 安裝編譯環境與遠端工具。
  4. service xinetd start 啟動 telnet 服務 (由 xinetd 管理)。
  5. 編譯測試程式與 telnet 連線測試驗證環境就緒。

優勢: 離線環境無需外網即可解決相依性、安裝速度極快、版本與生產環境一致。

Copyright © Windows教程網 All Rights Reserved