• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to configure yum server repository using iso dvd

    If you are not already aware of "YUM" (Yellowdog Updater, Modified) is used for installing rpms.
    Yum allows automatic updates, package and dependency management, on RPM-based distributions. Ideally yum is used to get direct updates from Red Hat Satellite Network but we can also configure it to use RHEL DVD as the source to install the rpms.

    Below steps are validated on Red Hat Enterprise Linux 7

    Mount the RHEL 7 installation dvd on a mount point
    # mount -o loop /tmp/rhel-server-7.3-x86_64-dvd.iso /mnt
    mount: /dev/loop0 is write-protected, mounting read-only

    If the DVD is mounted over virtual media
    # /mount /dev/sr0 /mnt
    Here "0" in sr0 is a variable and can vary if there is another USB/DVD mounted to the same node.





    Create a new file under /etc/yum.repos.d
    # vim /etc/yum.repos.d/rhel.repo
    [InstallMedia]
    name=Red Hat Enterprise Linux 7.3
    baseurl=file:///mnt
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

    Add the above content and save the file

    You can also disable the gpgcheck by using the below config
    [InstallMedia]
    name=Red Hat Enterprise Linux 7.3
    baseurl=file:///mnt
    gpgcheck=0
    enabled=1

    Clear the related caches
    # yum clean all
    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.
    Cleaning repos: InstallMedia
    Cleaning up everything

    List the repositories which are enabled
    # yum repolist all
    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.
    InstallMedia                                             | 4.1 kB  00:00:00
    (1/2): InstallMedia/group_gz                             | 136 kB  00:00:00
    (2/2): InstallMedia/primary_db                           | 3.9 MB  00:00:00
    repo id                     repo name                              status
    InstallMedia                Red Hat Enterprise Linux 7.3           enabled: 4,751
    repolist: 4,751




    Now you can start using 'yum'
    # yum install <package_name>

    I hope the article was useful.

    Deepak Prasad

    is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+


    Do you also have something to share here?
    Join GoLinuxHub Team as an Author, Click here for more information
    How to configure yum server repository using iso dvd How to configure yum server repository using iso dvd Reviewed by Deepak Prasad on Sunday, June 25, 2017 Rating: 5

    No comments:

    Powered by Blogger.