{"id":4166,"date":"2015-01-27T19:19:16","date_gmt":"2015-01-27T11:19:16","guid":{"rendered":"http:\/\/rmohan.com\/?p=4166"},"modified":"2015-01-27T19:19:16","modified_gmt":"2015-01-27T11:19:16","slug":"how-to-create-a-local-mirror-of-latest-red-hat-enterprise-linux-without-using-satellite-server","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4166","title":{"rendered":"How To create a local mirror of latest Red Hat Enterprise Linux without using Satellite server"},"content":{"rendered":"<p>How To create your own local Red Hat Enterprise Linux yum repository server<\/p>\n<p>To begin, build a virutal machine or stand alone system installing the same OS version of Red Hat you wish to serve as the yum repository.  At the time of this writing, my base OS plus mirror data consumed 14G of disk space so be sure to size your disk appropriately.  This is necessary as you must register the mirror server to a RHN Satellite, which allows the system to receive software updates.  It&#8217;s also important to know that one physical system cannot subscribe to multiple architecture base channels.  In otherwords, if you install a 64-bit OS, you cannot subscribe to the 32-bit channel.<\/p>\n<p>After the system has been deployed, you&#8217;re ready to begin:<\/p>\n<p>Register with RHN<br \/>\n~# rhn_register -vv &#8211;nox<br \/>\nInstall required packaged<br \/>\n~# yum install createrepo<br \/>\n~# yum install yum-utils<br \/>\nCreate a directory for the repo and sync the base channel<br \/>\n~# mkdir \/opt\/rhel6repo<br \/>\n~# reposync &#8211;gpgcheck -l &#8211;repoid=rhel-x86_64-server-6 &#8211;download_path=\/opt\/rhel6repo<br \/>\nNote: This will take a long time to run.  I ran mine overnight<br \/>\nCreate repo data<br \/>\n~# createrepo \/opt\/rhel6repo<br \/>\nConfigure apache to serve the content:<br \/>\n~# vi \/etc\/httpd\/conf.d\/rhel-6-repo.conf<\/p>\n<p>Alias \/rhel-6-repo \/opt\/rhel6repo<\/p>\n<p><Directory \/opt\/repository><br \/>\n Options Indexes MultiViews FollowSymLinks<br \/>\n Order allow,deny<br \/>\n Allow from all<br \/>\n<\/Directory><br \/>\nStart\/restart apache<br \/>\n~# service httpd start<\/p>\n<p>Next, configure the clients by adding the repo to the yum config:<\/p>\n<p>~# cat \/etc\/yum.repos.d\/rhel6.repo<br \/>\n[rhel-6-repo]<br \/>\nname=My Red Hat Enterprise Linux $releasever &#8211; $basearch<br \/>\nbaseurl=http:\/\/<IP_ADDRESS>\/rhel-6-repo<br \/>\nenabled=1<br \/>\ngpgcheck=0<\/p>\n<p>From the client, verify it can see the mirror with yum repolist<\/p>\n<p>You can disable connectivity to Red Hat network by changing the value of enabled = 0 in the file \/etc\/yum\/pluginconf.d\/rhnplugin.conf<\/p>\n<p>Clean out the yum cache and remove old header info on the client.<\/p>\n<p>~# yum clean all<\/p>\n<p>Now, you can list all of the updates available from your local mirror.<\/p>\n<p>~# yum list updates<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How To create your own local Red Hat Enterprise Linux yum repository server<\/p>\n<p>To begin, build a virutal machine or stand alone system installing the same OS version of Red Hat you wish to serve as the yum repository. At the time of this writing, my base OS plus mirror data consumed 14G of disk [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,17],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4166"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4166"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4166\/revisions"}],"predecessor-version":[{"id":4167,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4166\/revisions\/4167"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}