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配置成功 就可安装配置需要的命令工具包了。
posted @ 2020-06-17 17:45  still_j  阅读(2200)  评论(0编辑  收藏  举报