Redhat 7.6配置本地iso yum源


  • Redhat 企業版之后開始收費需要購買授權注冊,執行yum命令一直會提示你Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
  • 解決此問題,1.要么刪除redhat 自帶yum源 安裝其他的源,2.掛載本地ios 啟用本地yum源。方式1網上搜索一下一大把。我這里安裝掛載ios啟用本地源。
  • 虛機本地掛載ios安裝鏡像。
    •    

    • 掛載本地ios鏡像之后去系統配置
  • 登錄到Linux redhat 7.6 配置 /mnt
    • [root@localhost mnt]# mkdir cdrom
      [root@localhost mnt]# mount /dev/sr0 /mnt/cdrom
    • 查看ios掛載到cdrom下即可。
  • 進入到/etc/yum.repos.d 配置新的.repo文件。
    • Touch rehat7.6.repo
      [root@localhost yum.repos.d]# cat redhat7.6.repo
      
      [redhat7.6]
      
      name=my redhat7.6
      
      baseurl=file:///mnt/cdrom
      
      enable=1
      
      gpgcheck=0
      
      [root@localhost yum.repos.d]#
      

        

         

  • 配置完成之后執行命令 清除緩存 重新緩存本地yum
    [root@localhost yum.repos.d]# yum clean all
    
    Loaded plugins: product-id, search-disabled-repos, subscription-manager
    
    This system is not registered with an entitlement server. You can use subscription-manager to register. 
    
    Cleaning repos: redhat7.6
    
    Other repos take up 1.6 k of disk space (use --verbose for details)
    
    [root@localhost yum.repos.d]#
    
    [root@localhost yum.repos.d]#
    
    [root@localhost yum.repos.d]# yum makecache
    
    Loaded plugins: product-id, search-disabled-repos, subscription-manager
    
    This system is not registered with an entitlement server. You can use subscription-manager to register. 
    
    redhat7.6 | 4.3 kB 00:00:00
    
    (1/4): redhat7.6/group_gz | 146 kB 00:00:00
    
    (2/4): redhat7.6/primary_db | 4.2 MB 00:00:00
    
    (3/4): redhat7.6/filelists_db | 3.4 MB 00:00:00
    
    (4/4): redhat7.6/other_db | 1.6 MB 00:00:00
    
    Metadata Cache Created
    
    [root@localhost yum.repos.d]#
    
    [root@localhost yum.repos.d]# yum list |more
    
    Loaded plugins: product-id, search-disabled-repos, subscription-manager
    
    This system is not registered with an entitlement server. You can use subscription-manager to register. 
    
    Installed Packages
    
    GeoIP.x86_64 1.5.0-13.el7 @anaconda/7.6
    
    NetworkManager.x86_64 1:1.12.0-6.el7 @anaconda/7.6
    
    NetworkManager-config-server.noarch 1:1.12.0-6.el7 @anaconda/7.6
    
    NetworkManager-libnm.x86_64 1:1.12.0-6.el7 @anaconda/7.6
    
    NetworkManager-team.x86_64 1:1.12.0-6.el7 @anaconda/7.6
    
    NetworkManager-tui.x86_64 1:1.12.0-6.el7 @anaconda/7.6
    
    Red_Hat_Enterprise_Linux-Release_Notes-7-en-US.noarch
    
    7-2.el7 @anaconda/7.6
    
    acl.x86_64 2.2.51-14.el7 @anaconda/7.6
    
    aic94xx-firmware.noarch 30-6.el7 @anaconda/7.6
    
    alsa-firmware.noarch 1.0.28-2.el7 @anaconda/7.6
    
    alsa-lib.x86_64 1.1.6-2.el7 @anaconda/7.6
    
    alsa-tools-firmware.x86_64 1.1.0-1.el7 @anaconda/7.6
    
    audit.x86_64 2.8.4-4.el7 @anaconda/7.6
    
    audit-libs.x86_64 2.8.4-4.el7 @anaconda/7.6
    
    authconfig.x86_64 6.2.8-30.el7 @anaconda/7.6
    
    basesystem.noarch 10.0-7.el7 @anaconda/7.6
    
    bash.x86_64 4.2.46-31.el7 @anaconda/7.6
    
    bind-libs-lite.x86_64 32:9.9.4-72.el7 @anaconda/7.6
    
    bind-license.noarch 32:9.9.4-72.el7 @anaconda/7.6
    
    binutils.x86_64 2.27-34.base.el7 @anaconda/7.6
    

     

       

  • 如上操作反饋即表示本地yum配置成功 就可安裝配置需要的命令工具包了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM