yum local repository to share the contents

本文详细介绍了如何从Red Hat Enterprise Linux DVD复制内容到本地目录,并创建一个包含相应软件包的repo文件,最后通过客户端验证镜像的可用性和内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10670663/viewspace-765550/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值