Menu Close

Chapter 15. Creating a remote repository

Follow the steps in this procedure to create an installation source for a network-based installation using a remote repository containing extracted contents of the DVD ISO image. The installation source is accessed over HTTP or HTTPS.


  • A Red Hat Enterprise Linux 8 installation DVD/ISO image
  • Several servers running Red Hat Enterprise Linux

15.1. Installing Apache on RHEL

This procedure will help you install Apache on Red Hat Enterprise Linux 8.


  • Access to a repo with Apache webserver


  1. Install the httpd package

    # yum install httpd
  2. Run, then enable the Apache webserver. These commands will also start the webserver after reboot.

    # systemctl enable httpd
    # systemctl start httpd
  3. Insert any website files you may have.

    # echo Apache on RHEL {ProductNumber} > /var/www/html/index.html
  4. Update the firewall.

    # firewall-cmd --add-service=http --permanent
    # firewall-cmd --add-service=http
  5. Access the website.


15.2. Creating a remote repository

Multiple Red Hat Enterprise Linux servers may access a single Red Hat Enterprise Linux repository on the network. This requires a running web server, most likely this will be Apache.


  • A Red Hat Enterprise Linux 8 installation DVD
  • Several servers running Red Hat Enterprise Linux


  1. Mount and copy the content of downloaded DVD.

    mkdir /mnt/rhel{ProductNumber}
    mount -o loop,ro rhel-{ProductNumber}-x86_64-dvd.iso /mnt/rhel{ProductNumber}/
    cp -r /mnt/rhel{ProductNumber}/ /var/www/html/
    umount  /mnt/rhel{ProductNumber}

    The next step is performed on the client side, not on the server where Apache is installed.

  2. Create a repo file for both BaseOS and AppStream repositories.

    vi /etc/yum.repos.d/rhel_http_repo.repo
    name=RHEL_8_x86_64_HTTP BaseOS
    name=RHEL_8_x86_64_HTTP AppStream
    [root@localhost ~]# yum repolist
    Updating Subscription Management repositories.
    Unable to read consumer identity
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Last metadata expiration check: 0:08:33 ago on Út 23. července 2019, 16:48:09 CEST.
    repo id                                                              repo name                                                                        status
    AppStream_repo_http                                                  RHEL_8_x86_64_HTTP AppStream                                                   4,672
    BaseOS_repo_http                                                     RHEL_8_x86_64_HTTP BaseOS                                                      1,658
    [root@localhost ~]#