ITPub博客

首页 > Linux操作系统 > Linux操作系统 > yum local repository to share the contents

yum local repository to share the contents

原创 Linux操作系统 作者:michaelyf1 时间:2013-07-05 08:48:16 0 删除 编辑
  1. Copy the contents from the Red Hat Enterprise Linux DVD ISO RHELX-XXXX.iso the the destination web directory.

    # mkdir -p /var/www/html/cdrom/
    # mount -o loop RHELX-XXXX.iso /media
    # cp -rv /media/* /var/www/html/cdrom

2  Create a file called dvd.repo locally with the contents below :

     # cat /etc/yum.repos.d/cat.repo
     [RHEL5-Server-DVD]
     name=Red Hat Enterprise Linux $releasever - $basearch (DVD)
     baseurl=file:///var/www/html/cdrom/Server
     enabled=1
     gpgcheck=1
     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Verify from client

  1. # yum clean all
        # yum repolist
        Loaded plugins: katello, product-id, security, subscription-manager
        Updating certificate-based repositories.
        Unable to read consumer identity
        RHEL5-Server-DVD                                         | 1.5 kB     00:00    
        RHEL5-Server-DVD/primary                                 | 920 kB     00:00    
        RHEL5-Server-DVD                                                      3285/3285
        repo id          repo name                                                status
        RHEL5-Server-DVD Red Hat Enterprise Linux 5Server - x86_64 (DVD)          3,285
        repolist: 3,285

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10670663/viewspace-765550/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-10-09

  • 博文量
    40
  • 访问量
    59542