O'Reilly logo

Red Hat Enterprise Linux Server Cookbook by William Leemans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a copy of an RHN repository

In this recipe, I'll show you how you can set up a yum repository for Red Hat Network-based and "plain" yum repositories.

Getting ready

Before you create a copy of an RHN repository, you need to ensure that you have a valid subscription to the repository that you want to duplicate. When this prerequisite is met, you can perform this recipe from the machine that uses the subscription.

How to do it…

Before being able to create yum repositories, we need to install a couple of tools by performing the following steps:

  1. Install the createrepo and yum-utils packages using the following command:
    ~]# yum install -y yum-utils createrepo
    
  2. Now, install the Apache web server, as follows:
    ~]# yum install -y httpd
    

Syncing RHN repositories ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required