{"id":804,"date":"2014-06-16T18:03:54","date_gmt":"2014-06-17T00:03:54","guid":{"rendered":"https:\/\/mrguitar.net\/?p=804"},"modified":"2016-03-31T14:24:47","modified_gmt":"2016-03-31T20:24:47","slug":"rhel-7-and-subscription-manager","status":"publish","type":"post","link":"https:\/\/mrguitar.net\/?p=804","title":{"rendered":"RHEL 7 and subscription-manager"},"content":{"rendered":"<p>So RHEL 7 has been out for about a week, not including the beta or RC cycles, and one of the changes is worth documenting. Unless you use a Satellite Server, the concept of registering to RHN is gone. That means no more rhn_reg or rhnreg_ks to get your updates.<\/p>\n<p><strong>Bring on subscription-manager!<\/strong><\/p>\n<p><!--more--><br \/>\nThe next-gen registration tool was available in RHEL 6, but I never used it as there wasn&#8217;t any advantage for my use case. Well, now I have to and I think it&#8217;s worth documenting some of these strings. I&#8217;m primarily writing this so I can pull up this post to copy\/paste the commands. &#8230;I suck at remembering the repo names, and often don&#8217;t have the patience to look them up.<\/p>\n<p>Registering the system. &#8211;note that accounts w\/ a mix of various subscriptions and products might not want to auto attach.<br \/>\n<code>$ subscription-manager register --auto-attach<\/code><br \/>\nor<br \/>\n<code>$ subscription-manager register --auto-attach --username=[username] --password=[password]<\/code><\/p>\n<p><strong>Once registered we can configure the repos.<\/strong> I like to simply drop anything subscription-manager grabs and then add what I need. Thanks to rjerrido for that tip!<br \/>\n<code>$ subscription-manager repos --disable=*<\/code><br \/>\n<strong><br \/>\nThen grab the repos you want:<\/strong><br \/>\n<code>$ subscription-manager repos --enable=[repo-name]<\/code><\/p>\n<p><strong>Hint: these are the good ones:<\/strong><br \/>\n<code>$ subscription-manager repos --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-rpms --enable=rhel-7-server-supplementary-rpms<\/code><\/p>\n<p>Down the road fastrack will probably have some good stuff in it:<br \/>\nrhel-7-server-optional-fastrack-rpms<br \/>\nrhel-7-server-fastrack-rpms<\/p>\n<p>If you need something else, you can list the repos that are available via the subscription you attached:<br \/>\n<code>$ subscription-manager repos --list<\/code><\/p>\n<p>Don&#8217;t like this method? That&#8217;s ok try running subscription-manager-gui and register your system from there. Then you can modify the repos under &#8220;System&#8221; -&gt; &#8220;Repositories&#8221;<\/p>\n<p>Need the epel 7? Of course you do!<br \/>\n<code>yum install -y https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<\/code><\/p>\n<p>Now you&#8217;re ready to go! &#8230;btw if you&#8217;ve stumbled upon this blog post, you should really look at the official documentation and kbase articles available at https:\/\/access.redhat.com<br \/>\nThis is not a complete how-to for subscription-manager!<\/p>\n<hr>\n<p><span style=\"color: #ff0000;\">Update: <\/span>Since I have to do this all the time, I now just paste this into the terminal and go.<br \/>\n<code>subscription-manager register --auto-attach &amp;&amp; subscription-manager repos --disable=* &amp;&amp; subscription-manager repos --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-rpms <\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So RHEL 7 has been out for about a week, not including the beta or RC cycles, and one of the changes is worth documenting. Unless you use a Satellite Server, the concept of registering to RHN is gone. That means no more rhn_reg or rhnreg_ks to get your updates. Bring on subscription-manager!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-804","post","type-post","status-publish","format-standard","hentry","category-open-sourcenerd-stuff"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mrguitar.net\/index.php?rest_route=\/wp\/v2\/posts\/804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mrguitar.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mrguitar.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mrguitar.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mrguitar.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=804"}],"version-history":[{"count":6,"href":"https:\/\/mrguitar.net\/index.php?rest_route=\/wp\/v2\/posts\/804\/revisions"}],"predecessor-version":[{"id":828,"href":"https:\/\/mrguitar.net\/index.php?rest_route=\/wp\/v2\/posts\/804\/revisions\/828"}],"wp:attachment":[{"href":"https:\/\/mrguitar.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mrguitar.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mrguitar.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}