{"id":1473,"date":"2015-04-04T01:04:26","date_gmt":"2015-04-03T19:04:26","guid":{"rendered":"http:\/\/techsatwork.com\/blog\/?p=1473"},"modified":"2016-01-07T11:31:02","modified_gmt":"2016-01-07T05:31:02","slug":"adding-centos-repository-redhat-enterprise-linux","status":"publish","type":"post","link":"https:\/\/techsatwork.com\/?p=1473","title":{"rendered":"Adding CentOS repository to RedHat Enterprise Linux"},"content":{"rendered":"<p>Don&#8217;t have an active Red Hat subscription, but you want to use YUM ??? No problem, you can always add CentOS repository to the yum repos directory to have your red hat linux download and install from CentOS repository.<\/p>\n<p>So when trying to install a package using yum, you should be seeing the following message:<\/p>\n<p>[root@localhost ~]#\u00c2\u00a0<strong>yum install\u00c2\u00a0ksh<\/strong><br \/>\nLoaded plugins: rhnplugin, security<br \/>\n<strong>This system is not registered with RHN.<\/strong><br \/>\n<strong>RHN support will be disabled.<\/strong><br \/>\nSetting up Install Process<br \/>\nNo package ksh\u00c2\u00a0available.<br \/>\nNothing to do<br \/>\n[root@localhost ~]#<\/p>\n<p>Here is how :<br \/>\nEdit the file \u00c2\u00a0in\u00c2\u00a0<strong>vi \/etc\/yum.repos.d\/centos.repo \u00c2\u00a0\u00c2\u00a0<\/strong>and add the following lines<\/p>\n<p><span style=\"color: #ff6600;\">[centosrepo]<\/span><br \/>\n<span style=\"color: #ff6600;\">name=Centos Repository<\/span><br \/>\n<span style=\"color: #ff6600;\">baseurl=<a style=\"color: #ff6600;\" href=\"http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/enabled=1gpgcheck=1gpgkey=http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/RPM-GPG-KEY-CentOS-6\">http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/<br \/>\n<\/a><a style=\"color: #ff6600;\" href=\"http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/enabled=1gpgcheck=1gpgkey=http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/RPM-GPG-KEY-CentOS-6\">enabled=1<br \/>\n<\/a><a style=\"color: #ff6600;\" href=\"http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/enabled=1gpgcheck=1gpgkey=http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/RPM-GPG-KEY-CentOS-6\">gpgcheck=1<br \/>\n<\/a><a style=\"color: #ff6600;\" href=\"http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/enabled=1gpgcheck=1gpgkey=http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/RPM-GPG-KEY-CentOS-6\">gpgkey=http:\/\/mirror.cisp.com\/CentOS\/6\/os\/i386\/RPM-GPG-KEY-CentOS-6<\/a><\/span><\/p>\n<p>Now you should be able to install anything using YUM. \u00c2\u00a0Now try\u00c2\u00a0<strong>yum install\u00c2\u00a0ksh \u00c2\u00a0<\/strong>and it should work.<br \/>\nIf you have the server behind a proxy server, then you will need to update <strong>\/etc\/yum.conf\u00c2\u00a0<\/strong>and add the following lines :<\/p>\n<p><span style=\"color: #ff6600;\"># The proxy server &#8211; proxy server:port number proxy=http:\/\/myproxy.mydomain.com:3128 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 &#8212;-&gt; your proxy server and port number\u00c2\u00a0<\/span><br \/>\n<span style=\"color: #ff6600;\"># The account details for yum connections<\/span><br \/>\n<span style=\"color: #ff6600;\">proxy_username=yum-user \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 &#8212;-&gt; \u00c2\u00a0if you need users and password for your proxy<\/span><br \/>\n<span style=\"color: #ff6600;\">proxy_password=qwerty \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0&#8212;-&gt; \u00c2\u00a0if you need users and password for your proxy<\/span><\/p>\n<p>Now yum should be able to go access the centos repository. \u00c2\u00a0 As always use this at your own risk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Don&#8217;t have an active Red Hat subscription, but you want to use YUM ??? No problem, you can always add CentOS repository to the yum repos directory to have your red hat linux download and install from CentOS repository. So when trying to install a package using yum, you should be seeing the following message: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[3,358,156,142,1],"tags":[911,914,912,913],"class_list":["post-1473","post","type-post","status-publish","format-standard","hentry","category-db2","category-how-to","category-internet","category-linux","category-misc","tag-centos","tag-installing-centos-packages-on-red-hat","tag-redhat","tag-setup-yum-repository-in-redhat"],"_links":{"self":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1473"}],"version-history":[{"count":2,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1473\/revisions"}],"predecessor-version":[{"id":1475,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1473\/revisions\/1475"}],"wp:attachment":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}