[CentOS] RHEL7 beta discussions?

Wed Apr 23 18:37:53 UTC 2014
Warren Young <warren at etr-usa.com>

On 4/2/2014 07:16, Jim Perrin wrote:
>
>> I have to add the DVD as a repo. Here's what I do:
>
> You shouldn't need to do this. There should be a redhat.repo file in
> /etc/yum.repos.d

I didn't have such a thing on the RHEL7 beta VM I set up, nor on the 
RHEL7 RC I just set up.  /etc/yum.repos.d was empty on both machines 
after installation, and "yum repolist all" reports "repolist: 0".

Perhaps it only appears if you attach a RHN subscription to the machine?

Digimer's DVD repo method misses out on a lot of packages since the ISO 
files don't include the "optional" package set.  A big chunk of these 
are things like -devel packages corresponding to library packages, so if 
you're a software developer, the DVD/ISO contents are likely to be 
insufficient.

My method:

1. Mount the ISO or DVD on the machine, find the Packages directory, and 
copy it into /var/www/html/rhel7rc on one of the LAN's web servers.

(Putting it on a separate web server allows the repo to have a lifetime 
independent of the RHEL7 test system, and also allows you to share the 
repo among multiple test systems.)

2. From /var/www/html/rhel7rc on the web server, say:

     rsync -rv 
rsync://ftp.redhat.com/redhat/rhel/rc/7/Server-optional/x86_64/os/Packages .

This step downloads another ~2.1 GB of RPMs beyond what came on the 
installation DVD, merging thousands more RPMs into the set you copied 
from the DVD/ISO.

Substitute your OS edition for "Server" as necessary.  Ditto CPU type.

3. Create the repo:

     cd /var/www/html/rhel7rc
     createrepo .

When this completes, "ls /var/www/html/rhel7rc" should report:

      Packages  repodata

If you skip this step or don't do it right, yum won't chase dependencies 
properly.

4. Create /etc/yum.repos.d/rhel7rc.repo on the RHEL7 box:

     [rhel7rc]
     name=RHEL7 RC local mirror
     baseurl=http://rhel7rc/
     enabled=1
     gpgcheck=1
     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

"rhel7rc" is a CNAME or /etc/hosts alias for the web server.  We need to 
use such an alias because the next step is:

5. Save the following as /etc/httpd/conf.d/rhel7rc.conf:

     <VirtualHost *:80>
         DocumentRoot /var/www/html/rhel7rc
         ServerAlias rhel7rc

         <Directory "/var/www/html/rhel7rc">
             Allow from all
             AllowOverride None
             Options +Indexes
             Order allow,deny
         </Directory>
     </VirtualHost>

Then say "service httpd restart".

At this point, your new local mirror of RHEL7 RC should work.



(If you're wondering why I took the time to write all this up, it's 
because I figured it out back in December when the beta came out, then 
forgot a bunch of details in the ~4 months it took for the RC to come 
out and had to rediscover a bunch of it.  If nothing else, this way I'll 
have a reference I can dig out of my email Sent folder the next time I 
need to do this.)