{"id":5879,"date":"2015-02-01T15:42:57","date_gmt":"2015-02-01T07:42:57","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=5879"},"modified":"2023-04-28T09:47:19","modified_gmt":"2023-04-28T09:47:19","slug":"how-to-prepare-local-yum-repository-from-cd-romdvd-rom-image-on-rhel-7","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-prepare-local-yum-repository-from-cd-romdvd-rom-image-on-rhel-7\/","title":{"rendered":"How to Prepare Local Yum Repository from CD-ROM\/DVD-ROM image on RHEL 7"},"content":{"rendered":"<p>If you have installed Red Hat Enterprise Linux 7 (RHEL 7) but do not have access to the redhat official repo, you will encounter problems installing and updating software. To solve the above problems, I have prepared a short step to update and install the RPM package from the CD-ROM\/DVD-ROM image for RHEL 7. This step can also be used in RHEL 6 or older versions such as RHEL 5. For linux servers that do not have access to the internet or no access to the RHEL official repository, the steps below will help.<\/p>\n<p><h7>1. Mount the ISO from the DVD-ROM into \/mnt directory :<\/h7><\/p>\n<pre>\n[root@rhel7 ~]# mount \/dev\/cdrom \/mnt\n<\/pre>\n<p><h7>2. Take note the media ID :<\/h7><\/p>\n<pre>\n[root@rhel7 ~]# cat \/mnt\/media.repo\n<\/pre>\n<pre>\n[InstallMedia]\nname=RHEL-7.0 Server.x86_64\n<strong>mediaid=1294067623.154321<\/strong>\nmetadata_expire=-1\ngpgcheck=0\ncost=500\n<\/pre>\n<p><h7>3. Create rhel7.repo text file in \/etc\/yum.repos.d\/ with the following content. Make sure you include the correct media ID as above. Save the file :<\/h7><\/p>\n<pre>\n[root@rhel7 ~]# vi \/etc\/yum.repos.d\/rhel7.repo\n<\/pre>\n<pre>\n[Local-DVD-RHEL7-Repository]\nmediaid=1294067623.154321\nname=DVD-RHEL7 repository\nbaseurl=file:\/\/\/mnt\nenabled=1\ngpgcheck=0\n<\/pre>\n<p><h7>4. Install, remove and update using yum command.<\/h7><\/p>\n<pre>\n[root@rhel7 ~]# yum install perl -y\n<\/pre>\n<p><strong>Example :<\/strong><\/p>\n<pre>\n[root@rhel7 ~]# yum install perl -y\n..\n..\n====================================================================================================\n Package                    Arch       Version                 Repository                      Size\n====================================================================================================\nInstalling:\n perl                       x86_64     4:5.16.3-283.el7        Local-DVD-RHEL7-Repository     8.0 M\nInstalling for dependencies:\n perl-Carp                  noarch     1.26-244.el7            Local-DVD-RHEL7-Repository      19 k\n perl-Encode                x86_64     2.51-7.el7              Local-DVD-RHEL7-Repository     1.5 M\n perl-Exporter              noarch     5.68-3.el7              Local-DVD-RHEL7-Repository      28 k\n perl-File-Path             noarch     2.09-2.el7              Local-DVD-RHEL7-Repository      27 k\n perl-File-Temp             noarch     0.23.01-3.el7           Local-DVD-RHEL7-Repository      56 k\n perl-Filter                x86_64     1.49-3.el7              Local-DVD-RHEL7-Repository      76 k\n perl-Getopt-Long           noarch     2.40-2.el7              Local-DVD-RHEL7-Repository      56 k\n perl-HTTP-Tiny             noarch     0.033-3.el7             Local-DVD-RHEL7-Repository      38 k\n perl-PathTools             x86_64     3.40-5.el7              Local-DVD-RHEL7-Repository      83 k\n perl-Pod-Escapes           noarch     1:1.04-283.el7          Local-DVD-RHEL7-Repository      50 k\n perl-Pod-Perldoc           noarch     3.20-4.el7              Local-DVD-RHEL7-Repository      87 k\n perl-Pod-Simple            noarch     1:3.28-4.el7            Local-DVD-RHEL7-Repository     216 k\n perl-Pod-Usage             noarch     1.63-3.el7              Local-DVD-RHEL7-Repository      27 k\n perl-Scalar-List-Utils     x86_64     1.27-248.el7            Local-DVD-RHEL7-Repository      36 k\n perl-Socket                x86_64     2.010-3.el7             Local-DVD-RHEL7-Repository      49 k\n perl-Storable              x86_64     2.45-3.el7              Local-DVD-RHEL7-Repository      77 k\n perl-Text-ParseWords       noarch     3.29-4.el7              Local-DVD-RHEL7-Repository      14 k\n perl-Time-Local            noarch     1.2300-2.el7            Local-DVD-RHEL7-Repository      24 k\n perl-constant              noarch     1.27-2.el7              Local-DVD-RHEL7-Repository      19 k\n perl-libs                  x86_64     4:5.16.3-283.el7        Local-DVD-RHEL7-Repository     686 k\n perl-macros                x86_64     4:5.16.3-283.el7        Local-DVD-RHEL7-Repository      42 k\n perl-parent                noarch     1:0.225-244.el7         Local-DVD-RHEL7-Repository      12 k\n perl-podlators             noarch     2.5.1-3.el7             Local-DVD-RHEL7-Repository     112 k\n perl-threads               x86_64     1.87-4.el7              Local-DVD-RHEL7-Repository      49 k\n perl-threads-shared        x86_64     1.43-6.el7              Local-DVD-RHEL7-Repository      39 k\n\n..\n..\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you have installed Red Hat Enterprise Linux 7 (RHEL 7) but do not have access to the redhat official repo, you will encounter problems installing and updating software. To&#8230;<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2058,2062],"tags":[1536,1944],"class_list":["post-5879","post","type-post","status-publish","format-standard","hentry","category-rhel","category-yum","tag-linux","tag-yum-repositories"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/5879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=5879"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/5879\/revisions"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=5879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=5879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=5879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}