DVD repositories

  • Once you have downloaded a DVD version of your chosen Rhel Version and copied it over to a location on your server.
  • Mount the RHEL installation ISO to a directory like /mnt/disc, e.g.:
    # mkdir -p  /mnt/disc
    # mount -o loop RHEL7.1.iso /mnt/disc

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

    # mkdir -p  /mnt/disc
    # mount /dev/sr0  /mnt/disc
  • Copy the media.repo file from the root of the mounted directory to /etc/yum.repos.d/ and set the permissions to 0644 or another similar permissions set:
    # cp /mnt/disc/media.repo /etc/yum.repos.d/rhel7dvd.repo
    # chmod 644 /etc/yum.repos.d/rhel7dvd.repo
  • Edit the new repo file, changing the gpgcheck=0 setting to 1 and adding the following 3 lines
    vi /etc/yum.repos.d/rhel7dvd.repo

    In the end, the new repo file could look like the following

    name=DVD for Red Hat Enterprise Linux 7.1 Server
  • Clear the cache and check whether you can get the packages list from the DVD repo
    # yum clean all
    # yum repolist enabled
  • It should look like the following if no other repository is enabled.
    To avoid any corruption its recommend to disable any non-redhat repositories.
# yum repolist enabled
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id                                                                                 repo name                                                                     
InstallMedia                                                                        Red Hat Enterprise Linux 7.7 
repolist: 5,229
  • If no errors are returned, the following can be used to update:
    # yum update

Upgrade Kernel

awk -F\’ ‘$1=="menuentry " {print $2}’ /etc/grub2.cfg

yum install kernel-3.10.0-862.el7

yum –show-duplicates list kernel

grub2-set-default 1 (set default to 1st entry, 862 one)

grub2-mkconfig -o /boot/grub2/grub.cfg (update config)