{"id":469,"date":"2024-08-08T21:09:40","date_gmt":"2024-08-08T21:09:40","guid":{"rendered":"https:\/\/humtechno.com\/intro\/?p=469"},"modified":"2024-08-08T21:12:46","modified_gmt":"2024-08-08T21:12:46","slug":"create-local-repository-in-linux","status":"publish","type":"post","link":"https:\/\/humtechno.com\/intro\/2024\/08\/08\/create-local-repository-in-linux\/","title":{"rendered":"Create Local Repository in Linux"},"content":{"rendered":"\n\n\n\n<p class=\"wp-block-paragraph\">You can create Local Yum Repository be the use of below mentioned options<\/p>\n\n<h2 class=\"wp-block-heading\"><strong>Option 1<\/strong> (OEL \/ REDHAT 8 and above)<\/h2>\n\n<ul class=\"wp-block-list\">\n<li>Attached CD drive of Linux with VM or Machine <\/li>\n\n\n\n<li>Mount CD ROM in Linux<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">mkdir -p \/cdrom<br>mount -t iso9660 -o ro \/dev\/sr0 \/cdrom<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Delete All File exist in folder &#8220;\/etc\/yum.repos.d\/&#8221;<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">ls -lrt \/etc\/yum.repos.d\/<br>rm -rf \/etc\/yum.repos.d\/*<br>rm -rf \/etc\/yum.repos.d\/oracle-linux-ol8.repo<br>rm -rf \/etc\/yum.repos.d\/virt-ol8.repo<br>rm -rf \/etc\/yum.repos.d\/uek-ol8.repo<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Insert below Code in file &#8221; \/etc\/yum.repos.d\/my_yum.repo&#8221;<\/li>\n<\/ul>\n\n<h5 class=\"wp-block-heading\"><strong>vi \/etc\/yum.repos.d\/my_yum.repo<\/strong><\/h5>\n\n<p class=\"wp-block-paragraph\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n<p class=\"wp-block-paragraph\">[AppStream]<br>name=software from AppStream<br>baseurl=\/cdrom\/AppStream<br>gpgcheck=0<br>[BaseOS]<br>name=software from BaseOS<br>baseurl=\/cdrom\/BaseOS<br>gpgcheck=0<\/p>\n\n<p class=\"wp-block-paragraph\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n\n<ul class=\"wp-block-list\"><\/ul>\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n<h2 class=\"wp-block-heading\">Option 2 (OEL\/REDHAT 5 to 7)<\/h2>\n\n<ul class=\"wp-block-list\">\n<li>Attached CD drive of Linux with VM or Machine <\/li>\n\n\n\n<li>Install RPM from CDROM Folder<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">cd \/media\/redha\/packages\/<\/p>\n\n<p class=\"wp-block-paragraph\">rpm -Uvh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm<br>rpm -Uvh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm<br>rpm -ivh createrepo-0.9.9-18.0.1.el6.noarch.rpm<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Copying RPM to Local Folder of VM or Machine<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">mkdir \/repo<br>cp \/media\/redha\/packages\/* \/repo<br>cd \/repo<br>rpm -ivh createrepo*<br>cd \/repo<br>createrepo.<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Delete All File exist in folder &#8220;\/etc\/yum.repos.d\/&#8221;<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">ls -lrt \/etc\/yum.repos.d\/<br>rm -rf \/etc\/yum.repos.d\/*<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Insert below Code in file &#8221; \/etc\/yum.repos.d\/localrepo.repo&#8221;<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">vi \/etc\/yum.repos.d\/localrepo.repo<\/p>\n\n<p class=\"wp-block-paragraph\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br>[localrepo]<br>name=localrepo<br>baseurl=file:\/\/\/repo\/<br>enabled=1<br>gpgcheck=0<br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":471,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[61],"tags":[59,60],"class_list":["post-469","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-create-local-repository-in-linux","tag-local-repository"],"_links":{"self":[{"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/posts\/469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/comments?post=469"}],"version-history":[{"count":2,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/posts\/469\/revisions"}],"predecessor-version":[{"id":472,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/posts\/469\/revisions\/472"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/media\/471"}],"wp:attachment":[{"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/media?parent=469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/categories?post=469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humtechno.com\/intro\/wp-json\/wp\/v2\/tags?post=469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}