{"id":415,"date":"2014-07-26T18:22:55","date_gmt":"2014-07-26T12:52:55","guid":{"rendered":"http:\/\/askadmin.com\/?p=415"},"modified":"2015-04-07T14:43:53","modified_gmt":"2015-04-07T09:13:53","slug":"configuring-local-rpm-repository-on-rhel-and-cent-os","status":"publish","type":"post","link":"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/","title":{"rendered":"Configuring Local RPM repository on RHEL and Cent OS"},"content":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Sometimes we may need to install a bunch of rpm files at once . If we configure local  yum repository , we can install all rpm files at once with yum command. <\/p>\n<p>If a vendor is frequently updating the packages in the remote repository and you just want to stick with old packages , then you can download all rpm packages from teh vendor remote base URL  and  add them to local repository  and then run <em>yum install package<\/em>.<\/p>\n<p> To create a rpm repository first install &#8220;createrepo&#8221; package by running <em><strong>yum install createrepo<\/strong><\/em><\/p>\n<p>make a directory where you want to copy all rpm files.<\/p>\n<p># <em><strong>mkdir \/My_repository<\/strong><\/em><\/p>\n<p># <em><strong>cp<\/strong><\/em>  from_rpms_directory\/*  <em><strong>\/My_repository<\/strong><\/em><\/p>\n<p>Now run command<\/p>\n<p>#<em><strong>createrepo \/My_repository<\/strong><\/em><\/p>\n<p>Add repository file in \/etc\/yum.repos.d\/<\/p>\n<p>#<em><strong>vi \/etc\/yum.repos.d\/my_app.repo<\/strong><\/em><\/p>\n<p>then add the entries like <\/p>\n<p><em>[my_app]<br \/>\nname=My application from local repository<br \/>\nbaseurl=file:\/\/\/My_repository\/<br \/>\nenabled=1<br \/>\ngpgcheck=0<\/em><\/p>\n<p>Now we can issue yum command to install my_app package<\/p>\n<p># <em><strong>yum install my_app<\/strong><\/em><\/p>\n<p>If you have a web server  running ,you can upload rpm files to the web directory  and just replace <em>file:\/\/<\/em> with <em>http:\/\/<\/em>  .<\/p>\n<p>this way you can share this repository with other servers when you needed .<\/p>\n<p>example <em>baseurl=http:\/\/mywebserver_ip\/repo\/<\/em> .<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; Sometimes we may need to install a bunch of rpm files at once . If we configure local yum repository , we can install all rpm files at once with yum command. If a vendor is frequently updating the packages in the remote repository and you just want to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[7],"tags":[82,85,83,84],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Configuring local yum repository on Linux<\/title>\n<meta name=\"description\" content=\"Configuring local yum repository on Linux\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Configuring local yum repository on Linux\" \/>\n<meta property=\"og:description\" content=\"Configuring local yum repository on Linux\" \/>\n<meta property=\"og:url\" content=\"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/\" \/>\n<meta property=\"og:site_name\" content=\"Ask Admin - A Lifelong Learner\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-26T12:52:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-04-07T09:13:53+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"balu sreekanth\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/askadmin.com\/aa\/#website\",\"url\":\"https:\/\/askadmin.com\/aa\/\",\"name\":\"Ask Admin - A Lifelong Learner\",\"description\":\"Mobile App Development | IP Telephony | Linux\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/askadmin.com\/aa\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/#webpage\",\"url\":\"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/\",\"name\":\"Configuring local yum repository on Linux\",\"isPartOf\":{\"@id\":\"https:\/\/askadmin.com\/aa\/#website\"},\"datePublished\":\"2014-07-26T12:52:55+00:00\",\"dateModified\":\"2015-04-07T09:13:53+00:00\",\"author\":{\"@id\":\"https:\/\/askadmin.com\/aa\/#\/schema\/person\/e1ff95d4a91ea001e25af3273533a345\"},\"description\":\"Configuring local yum repository on Linux\",\"breadcrumb\":{\"@id\":\"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/askadmin.com\/aa\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configuring Local RPM repository on RHEL and Cent OS\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/askadmin.com\/aa\/#\/schema\/person\/e1ff95d4a91ea001e25af3273533a345\",\"name\":\"balu sreekanth\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/askadmin.com\/aa\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6aebf95935573dc70f536f1003a2fb8c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6aebf95935573dc70f536f1003a2fb8c?s=96&d=mm&r=g\",\"caption\":\"balu sreekanth\"},\"sameAs\":[\"http:\/\/askadmin.com\"],\"url\":\"https:\/\/askadmin.com\/aa\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Configuring local yum repository on Linux","description":"Configuring local yum repository on Linux","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/","og_locale":"en_US","og_type":"article","og_title":"Configuring local yum repository on Linux","og_description":"Configuring local yum repository on Linux","og_url":"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/","og_site_name":"Ask Admin - A Lifelong Learner","article_published_time":"2014-07-26T12:52:55+00:00","article_modified_time":"2015-04-07T09:13:53+00:00","twitter_misc":{"Written by":"balu sreekanth","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/askadmin.com\/aa\/#website","url":"https:\/\/askadmin.com\/aa\/","name":"Ask Admin - A Lifelong Learner","description":"Mobile App Development | IP Telephony | Linux","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/askadmin.com\/aa\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/#webpage","url":"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/","name":"Configuring local yum repository on Linux","isPartOf":{"@id":"https:\/\/askadmin.com\/aa\/#website"},"datePublished":"2014-07-26T12:52:55+00:00","dateModified":"2015-04-07T09:13:53+00:00","author":{"@id":"https:\/\/askadmin.com\/aa\/#\/schema\/person\/e1ff95d4a91ea001e25af3273533a345"},"description":"Configuring local yum repository on Linux","breadcrumb":{"@id":"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/askadmin.com\/aa\/configuring-local-rpm-repository-on-rhel-and-cent-os\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/askadmin.com\/aa\/"},{"@type":"ListItem","position":2,"name":"Configuring Local RPM repository on RHEL and Cent OS"}]},{"@type":"Person","@id":"https:\/\/askadmin.com\/aa\/#\/schema\/person\/e1ff95d4a91ea001e25af3273533a345","name":"balu sreekanth","image":{"@type":"ImageObject","@id":"https:\/\/askadmin.com\/aa\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/6aebf95935573dc70f536f1003a2fb8c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6aebf95935573dc70f536f1003a2fb8c?s=96&d=mm&r=g","caption":"balu sreekanth"},"sameAs":["http:\/\/askadmin.com"],"url":"https:\/\/askadmin.com\/aa\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/posts\/415"}],"collection":[{"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":5,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/posts\/415\/revisions\/420"}],"wp:attachment":[{"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}