Set up yum repository for locally-mounted DVD on Red Hat Enterprise Linux 7

 Mount the RHEL 7 installation ISO to a directory like /mnt, e.g.:
  1. # mount -o loop RHEL7.1.iso /mnt

    If you use DVD media , you can mount like below.

    # mount -o loop /dev/sr0  /mnt
  2. Copy the media.repo file from the root of the mounted directory to /etc/yum.repos.d/ and set the permissions to something sane, e.g.:
    # cp /mnt/media.repo /etc/yum.repos.d/rhel7dvd.repo
    # chmod 644 /etc/yum.repos.d/rhel7dvd.repo
  3. Edit the new repo file, changing the gpgcheck=0 setting to 1 and adding the following 3 lines

    In the end, the new repo file could look like the following (though the mediaid will be different depending on the version of RHEL):

    name=DVD for Red Hat Enterprise Linux 7.1 Server
  4. clear the related caches by yum clean all and subscription-manager clean once
    # yum clean all
    # subscription-manager clean
  5. check whether you can get the packages list from the DVD repo
    # yum  --noplugins list
  6. if no problem , you wil update
    # yum  --noplugins update
Categories: Redhat

1 Comment

bolton computer repair · 03/09/2020 at 00:16

Keep up the good piece of work, I read few content
on this website and I conceive that your site is really interesting and has got sets of
great info.

Leave a Reply

Your email address will not be published. Required fields are marked *

seventeen + thirteen =

Related Posts


Change the default kernel in GRUB that is loaded at startup

Issue The kernel booted by default (using GRUB) is different from the one you would like to be automatically selected on startup. How do I change the default kernel in GRUB that is loaded at Read more…


How to change / set hostname Centos / RHEL 7

How to change / set hostname Centos / RHEL 7 Hostname types We can configure 3 hostname types is CentOS/RHEL 7 : Hostname Type Description Static Assigned by the system admin Dynamic Assigned by DHCP Read more…


Linux Test Disk I/O Performance

How can I use dd command on a Linux to test I/O performance of my hard disk drive? How do I check the performance of a hard drive including the read and write speed on Read more…