Menu Close

Chapter 1. Preparing for your RHEL installation

This section describes how to prepare for your Red Hat Enterprise Linux installation.

1.1. Supported RHEL architectures and system requirements

Red Hat Enterprise Linux 9 delivers a stable, secure, consistent foundation across hybrid cloud deployments with the tools needed to deliver workloads faster with less effort. It can be deployed as a guest on supported hypervisors and Cloud provider environments as well as deployed on physical infrastructure, so your applications can take advantage of innovations in the leading hardware architecture platforms.

This section contains information about the supported architectures and the system requirements for installing Red Hat Enterprise Linux.

1.1.1. Supported architectures

Red Hat Enterprise Linux supports the following architectures:

  • AMD, Intel, and ARM 64-bit architectures
  • IBM Power Systems, Little Endian

    • IBM Power System LC servers
    • IBM Power System AC servers
    • IBM Power System L servers
  • 64-bit IBM Z
Note

For installation instructions on IBM Power Servers, refer to IBM installation documentation. To ensure that your system is supported for installing RHEL, refer to https://catalog.redhat.com and https://access.redhat.com/articles/rhel-limits.

1.1.2. System requirements

If this is a first-time install of Red Hat Enterprise Linux it is recommended that you review the guidelines provided for system, hardware, security, memory, and RAID before installing. See System requirements reference for more information.

If you want to use your system as a virtualization host, review the necessary hardware requirements for virtualization.

1.2. Installation methods

Depending on your requirements, you can install Red Hat Enterprise Linux using several methods. Review the following sections to determine the best installation method for your requirements.

1.2.1. Available installation methods

You can install Red Hat Enterprise Linux using any of the following methods:

  • GUI-based installations
  • System or cloud image-based installations
  • Advanced installations
Note

This document provides details about installing Red Hat Enterprise Linux using the advanced installation methods.

Advanced installations

The following advanced installation methods are available:

  • Perform an automated RHEL installation using Kickstart: Install Red Hat Enterprise Linux using Kickstart. Kickstart is an automated installation that allows you to execute unattended operating system installation tasks.
  • Register and install RHEL from the Content Delivery Network: Register and install Red Hat Enterprise Linux on all architectures from the Content Delivery Network (CDN). Registration is performed before the installation packages are downloaded and installed from CDN. This installation method is supported by the graphical user interface and Kickstart.
  • Perform a remote RHEL installation using VNC: The RHEL installation program offers two VNC installation modes: Direct and Connect. Once a connection is established, the two modes do not differ. The mode you select depends on your environment.
  • Install RHEL from the network using PXE : A network installation allows you to install Red Hat Enterprise Linux to a system that has access to an installation server. At a minimum, two systems are required for a network installation.

System or cloud image-based installations

You can use system or cloud image-based installation methods only in virtual and cloud environments. To perform a system or cloud image-based installation, use Red Hat Image Builder. Image Builder creates customized system images of Red Hat Enterprise Linux, including the system images for cloud deployment.

For more information about installing RHEL using Image Builder, see Composing a customized RHEL system image document.

GUI-based installations

The following GUI-based installation methods are available:

  • Install RHEL using an ISO image from the Customer Portal: Install Red Hat Enterprise Linux by downloading the DVD ISO image file from the Customer Portal. Registration is performed after the installation completes. This installation method is supported by the GUI and Kickstart.
  • Register and install RHEL from the Content Delivery Network: Register your system, attach subscriptions, and install Red Hat Enterprise Linux from the Content Delivery Network (CDN). This installation method is supported by the Boot ISO and DVD ISO image files; however, it is recommended that you use the Boot ISO image file as the installation source defaults to CDN for the Boot ISO image file. Registration is performed before the installation packages are downloaded and installed from the CDN. This installation method is supported by the GUI and Kickstart.

1.3. Downloading a RHEL installation ISO image

This section contains instructions about downloading a Red Hat Enterprise Linux installation image from the Red Hat Customer Portal or by using the curl command.

1.3.1. Types of installation ISO images

Two types of Red Hat Enterprise Linux 9 installation ISO images are available from the Red Hat Customer Portal.

DVD ISO image file
A full installation program that contains the BaseOS and AppStream repositories and allows you to complete the installation without additional repositories.
Boot ISO image file

The Boot ISO image is a minimal installation that can be used to install RHEL in two different ways:

  1. When registering and installing RHEL from the Content Delivery Network (CDN).
  2. As a minimal image that requires access to the BaseOS and AppStream repositories to install software packages. The repositories are part of the DVD ISO image that is available for download from the Red Hat Customer Portal. Download and unpack the DVD ISO image to access the repositories.

The following table contains information about the images that are available for the supported architectures.

Table 1.1. Boot and installation images

ArchitectureInstallation DVDBoot DVD

AMD64 and Intel 64

x86_64 DVD ISO image file

x86_64 Boot ISO image file

ARM 64

AArch64 DVD ISO image file

AArch64 Boot ISO image file

IBM POWER

ppc64le DVD ISO image file

ppc64le Boot ISO image file

64-bit IBM Z

s390x DVD ISO image file

s390x Boot ISO image file

1.3.2. Downloading an ISO image from the Customer Portal

This procedure describes how to download a Red Hat Enterprise Linux 9 ISO image file from the Red Hat Customer Portal.

Note
  • The Boot ISO image is a minimal image file that supports registering your system, attaching subscriptions, and installing RHEL from the Content Delivery Network (CDN).
  • The DVD ISO image file contains all repositories and software packages and does not require any additional configuration.

Prerequisites

  • You have an active Red Hat subscription.
  • You are logged in to the Product Downloads section of the Red Hat Customer Portal at Product Downloads.

Procedure

  1. From the Product Downloads page, select the By Category tab.
  2. Click the Red Hat Enterprise Linux 9 link.

    The Download Red Hat Enterprise Linux web page opens.

  3. From the Product Variant drop-down menu, select the variant that you require.

    1. Optional: Select the Packages tab to view the packages contained in the selected variant. For information on the packages available in Red Hat Enterprise Linux 9, see the Package Manifest document.
  4. The Version drop-down menu defaults to the latest version for the selected variant.
  5. The Architecture drop-down menu displays the supported architecture.

    The Product Software tab displays the image files, which include:

    • Red Hat Enterprise Linux Binary DVD image.
    • Red Hat Enterprise Linux Boot ISO image.

    Additional images may be available, for example, preconfigured virtual machine images, but they are beyond the scope of this document.

  6. Click Download Now beside the ISO image that you require.

1.3.3. Downloading an ISO image using curl

This section explains how to download installation images using the curl command.

Prerequisites

  • Install curl and jq package:

    • If your distribution uses the dnf package manager:

      # dnf install curl
      # dnf install jq
    • If your distribution uses the apt package manager:

      # apt update
      # apt install curl
      # apt install jq
  • If your Linux distribution does not use dnf or apt, or if you do not use Linux, download the most appropriate software package from the curl website
  • Offline generated token from Red Hat API Tokens
  • Checksum of the file you want to download from Product Downloads

Procedure

  1. Create a bash file with the following content:

    #!/bin/bash
    # set the offline token and checksum parameters
    offline_token="<offline_token>"
    checksum=<checksum>
    
    # get an access token
    access_token=$(curl https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token -d grant_type=refresh_token -d client_id=rhsm-api -d refresh_token=$offline_token | jq -r '.access_token')
    
    # get the filename and download url
    image=$(curl -H "Authorization: Bearer $access_token" "https://api.access.redhat.com/management/v1/images/$checksum/download")
    filename=$(echo $image | jq -r .body.filename)
    url=$(echo $image | jq -r .body.href)
    
    # download the file
    curl $url -o $filename

    In this text above, replace the offline_token with the token collected from the Red Hat API portal and checksum value taken from the Product Downloads page.

  2. Make this file executable.

    $ chmod u+x FILEPATH/FILENAME.sh
  3. Open a terminal window and execute the bash file.

    $ ./FILEPATH/FILENAME.sh
Warning

Use password management that is consistent with networking best practices.

  • Do not store passwords or credentials in a plain text.
  • Keep the token safe against unauthorized use.

Additional resources

1.4. Creating a bootable installation medium for RHEL

This section contains information about using the ISO image file that you have downloaded to create a bootable physical installation medium, such as a USB, DVD, or CD. For more information about downloading the ISO images, see Downloading the installation ISO image

1.4.1. Installation boot media options

There are several options available to boot the Red Hat Enterprise Linux installation program.

Full installation DVD or USB flash drive
Create a full installation DVD or USB flash drive using the DVD ISO image. The DVD or USB flash drive can be used as a boot device and as an installation source for installing software packages. Due to the size of the DVD ISO image, a DVD or USB flash drive are the recommended media types.
Minimal installation DVD, CD, or USB flash drive
Create a minimal installation CD, DVD, or USB flash drive using the Boot ISO image, which contains only the minimum files necessary to boot the system and start the installation program.
Important

If you are not using the Content Delivery Network (CDN) to download the required software packages, the Boot ISO image requires an installation source that contains the required software packages.

1.4.2. Creating a bootable DVD or CD

You can create a bootable installation DVD or CD using burning software and a CD/DVD burner. The exact steps to produce a DVD or CD from an ISO image file vary greatly, depending on the operating system and disc burning software installed. Consult your system’s burning software documentation for the exact steps to burn a CD or DVD from an ISO image file.

Warning

You can create a bootable DVD or CD using either the DVD ISO image (full install) or the Boot ISO image (minimal install). However, the DVD ISO image is larger than 4.7 GB, and as a result, it might not fit on a single or dual-layer DVD. Check the size of the DVD ISO image file before you proceed. A USB key is recommended when using the DVD ISO image to create bootable installation media.

1.4.3. Creating a bootable USB device on Linux

Follow this procedure to create a bootable USB device on a Linux system.

Note

This procedure is destructive and data on the USB flash drive is destroyed without a warning.

Prerequisites

  • You have downloaded an installation ISO image as described in Downloading the installation ISO image.
  • The DVD ISO image is larger than 4.7 GB, so a USB flash drive that is large enough to hold the ISO image is required.

Procedure

  1. Connect the USB flash drive to the system.
  2. Open a terminal window and run the dmesg command:

    $ dmesg|tail

    The dmesg command returns a log that details all recent events. Messages resulting from the attached USB flash drive are displayed at the bottom of the log. Record the name of the connected device.

  3. Switch to user root:

    $ su -
  4. Enter your root password when prompted.
  5. Find the device node assigned to the drive. In this example, the drive name is sdd.

    # dmesg|tail
    [288954.686557] usb 2-1.8: New USB device strings: Mfr=0, Product=1, SerialNumber=2
    [288954.686559] usb 2-1.8: Product: USB Storage
    [288954.686562] usb 2-1.8: SerialNumber: 000000009225
    [288954.712590] usb-storage 2-1.8:1.0: USB Mass Storage device detected
    [288954.712687] scsi host6: usb-storage 2-1.8:1.0
    [288954.712809] usbcore: registered new interface driver usb-storage
    [288954.716682] usbcore: registered new interface driver uas
    [288955.717140] scsi 6:0:0:0: Direct-Access     Generic  STORAGE DEVICE   9228 PQ: 0 ANSI: 0
    [288955.717745] sd 6:0:0:0: Attached scsi generic sg4 type 0
    [288961.876382] sd 6:0:0:0: sdd Attached SCSI removable disk
  6. Run the dd command to write the ISO image directly to the USB device.

    # dd if=/image_directory/image.iso of=/dev/device

    Replace /image_directory/image.iso with the full path to the ISO image file that you downloaded, and replace device with the device name that you retrieved with the dmesg command. In this example, the full path to the ISO image is /home/testuser/Downloads/rhel-9-x86_64-boot.iso, and the device name is sdd:

    # dd if=/home/testuser/Downloads/rhel-9-x86_64-boot.iso of=/dev/sdd
    Note

    Ensure that you use the correct device name, and not the name of a partition on the device. Partition names are usually device names with a numerical suffix. For example, sdd is a device name, and sdd1 is the name of a partition on the device sdd.

  7. Wait for the dd command to finish writing the image to the device. The data transfer is complete when the # prompt appears. When the prompt is displayed, log out of the root account and unplug the USB drive. The USB drive is now ready to be used as a boot device.

1.4.4. Creating a bootable USB device on Windows

Follow the steps in this procedure to create a bootable USB device on a Windows system. The procedure varies depending on the tool. Red Hat recommends using Fedora Media Writer, available for download at https://github.com/FedoraQt/MediaWriter/releases.

Note
  • Fedora Media Writer is a community product and is not supported by Red Hat. You can report any issues with the tool at https://github.com/FedoraQt/MediaWriter/issues.
  • This procedure is destructive and data on the USB flash drive is destroyed without a warning.

Prerequisites

  • You have downloaded an installation ISO image as described in Downloading the installation ISO image.
  • The DVD ISO image is larger than 4.7 GB, so a USB flash drive that is large enough to hold the ISO image is required.

Procedure

  1. Download and install Fedora Media Writer from https://github.com/FedoraQt/MediaWriter/releases.

    Note

    To install Fedora Media Writer on Red Hat Enterprise Linux, use the pre-built Flatpak package. You can obtain the package from the official Flatpak repository Flathub.org at https://flathub.org/apps/details/org.fedoraproject.MediaWriter.

  2. Connect the USB flash drive to the system.
  3. Open Fedora Media Writer.
  4. From the main window, click Custom Image and select the previously downloaded Red Hat Enterprise Linux ISO image.
  5. From Write Custom Image window, select the drive that you want to use.
  6. Click Write to disk. The boot media creation process starts. Do not unplug the drive until the operation completes. The operation may take several minutes, depending on the size of the ISO image, and the write speed of the USB drive.
  7. When the operation completes, unmount the USB drive. The USB drive is now ready to be used as a boot device.

1.4.5. Creating a bootable USB device on Mac OS X

Follow the steps in this procedure to create a bootable USB device on a Mac OS X system.

Note

This procedure is destructive and data on the USB flash drive is destroyed without a warning.

Prerequisites

  • You have downloaded an installation ISO image as described in Downloading the installation ISO image.
  • The DVD ISO image is larger than 4.7 GB, so a USB flash drive that is large enough to hold the ISO image is required.

Procedure

  1. Connect the USB flash drive to the system.
  2. Identify the device path with the diskutil list command. The device path has the format of /dev/disknumber, where number is the number of the disk. The disks are numbered starting at zero (0). Typically, Disk 0 is the OS X recovery disk, and Disk 1 is the main OS X installation. In the following example, the USB device is disk2:

    $ diskutil list
    /dev/disk0
    #:                       TYPE NAME                    SIZE       IDENTIFIER
    0:      GUID_partition_scheme                        *500.3 GB   disk0
    1:                        EFI EFI                     209.7 MB   disk0s1
    2:          Apple_CoreStorage                         400.0 GB   disk0s2
    3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    4:          Apple_CoreStorage                         98.8 GB    disk0s4
    5:                 Apple_Boot Recovery HD             650.0 MB   disk0s5
    /dev/disk1
    #:                       TYPE NAME                    SIZE       IDENTIFIER
    0:                  Apple_HFS YosemiteHD             *399.6 GB   disk1
    Logical Volume on disk0s1
    8A142795-8036-48DF-9FC5-84506DFBB7B2
    Unlocked Encrypted
    /dev/disk2
    #:                       TYPE NAME                    SIZE       IDENTIFIER
    0:     FDisk_partition_scheme                        *8.1 GB     disk2
    1:               Windows_NTFS SanDisk USB             8.1 GB     disk2s1
  3. To identify your USB flash drive, compare the NAME, TYPE and SIZE columns to your flash drive. For example, the NAME should be the title of the flash drive icon in the Finder tool. You can also compare these values to those in the information panel of the flash drive.
  4. Use the diskutil unmountDisk command to unmount the flash drive’s filesystem volumes:

    $ diskutil unmountDisk /dev/disknumber
    					Unmount of all volumes on disknumber was successful

    When the command completes, the icon for the flash drive disappears from your desktop. If the icon does not disappear, you may have selected the wrong disk. Attempting to unmount the system disk accidentally returns a failed to unmount error.

  5. Log in as root:

    $ su -
  6. Enter your root password when prompted.
  7. Use the dd command as a parameter of the sudo command to write the ISO image to the flash drive:

    # sudo dd if=/path/to/image.iso of=/dev/rdisknumber
    Note

    Mac OS X provides both a block (/dev/disk*) and character device (/dev/rdisk*) file for each storage device. Writing an image to the /dev/rdisknumber character device is faster than writing to the /dev/disknumber block device.

  8. To write the /Users/user_name/Downloads/rhel-9-x86_64-boot.iso file to the /dev/rdisk2 device, run the following command:

    # sudo dd if=/Users/user_name/Downloads/rhel-9-x86_64-boot.iso of=/dev/rdisk2
  9. Wait for the dd command to finish writing the image to the device. The data transfer is complete when the # prompt appears. When the prompt is displayed, log out of the root account and unplug the USB drive. The USB drive is now ready to be used as a boot device.

1.5. Preparing an installation source

The Boot ISO image file does not include any repositories or software packages; it contains only the installation program and the tools required to boot the system and start the installation. This section contains information about creating an installation source for the Boot ISO image using the DVD ISO image that contains the required repositories and software packages.

Important

An installation source is required for the Boot ISO image file only if you decide not to register and install RHEL from the Content Delivery Network (CDN).

1.5.1. Types of installation source

You can use one of the following installation sources for minimal boot images:

  • DVD: Burn the DVD ISO image to a DVD. The DVD will be automatically used as the installation source (software package source).
  • Hard drive or USB drive: Copy the DVD ISO image to the drive and configure the installation program to install the software packages from the drive. If you use a USB drive, verify that it is connected to the system before the installation begins. The installation program cannot detect media after the installation begins.

    • Hard drive limitation: The DVD ISO image on the hard drive must be on a partition with a file system that the installation program can mount. The supported file systems are xfs, ext2, ext3, ext4, and vfat (FAT32).
    Warning

    On Microsoft Windows systems, the default file system used when formatting hard drives is NTFS. The exFAT file system is also available. However, neither of these file systems can be mounted during the installation. If you are creating a hard drive or a USB drive as an installation source on Microsoft Windows, verify that you formatted the drive as FAT32. Note that the FAT32 file system cannot store files larger than 4 GiB.

    In Red Hat Enterprise Linux 9, you can enable installation from a directory on a local hard drive. To do so, you need to copy the contents of the DVD ISO image to a directory on a hard drive and then specify the directory as the installation source instead of the ISO image. For example: inst.repo=hd:<device>:<path to the directory>

  • Network location: Copy the DVD ISO image or the installation tree (extracted contents of the DVD ISO image) to a network location and perform the installation over the network using the following protocols:

    • NFS: The DVD ISO image is in a Network File System (NFS) share.
    • HTTPS, HTTP or FTP: The installation tree is on a network location that is accessible over HTTP, HTTPS or FTP.

1.5.2. Specify the installation source

You can specify the installation source using any of the following methods:

1.5.3. Ports for network-based installation

The following table lists the ports that must be open on the server providing the files for each type of network-based installation.

Table 1.2. Ports for network-based installation

Protocol usedPorts to open

HTTP

80

HTTPS

443

FTP

21

NFS

2049, 111, 20048

TFTP

69

Additional resources

1.5.4. Creating an installation source on an NFS server

Follow the steps in this procedure to place the installation source on an NFS server. Use this installation method to install multiple systems from a single source, without having to connect to physical media.

Prerequisites

  • You have administrator level access to a server with Red Hat Enterprise Linux 9, and this server is on the same network as the system to be installed.
  • You have downloaded a Binary DVD image. See Downloading the installation ISO image from the Performing a standard RHEL 9 installation document for more information.
  • You have created a bootable CD, DVD, or USB device from the image file. See Creating installation media from the Performing a standard RHEL 9 installation document for more information.
  • You have verified that your firewall allows the system you are installing to access the remote installation source. See Ports for network-based installation from the Performing a standard RHEL 9 installation document for more information.

Procedure

  1. Install the nfs-utils package:

    # dnf install nfs-utils
  2. Copy the DVD ISO image to a directory on the NFS server.
  3. Open the /etc/exports file using a text editor and add a line with the following syntax:

    /exported_directory/ clients
  4. Replace /exported_directory/ with the full path to the directory with the ISO image. Replace clients with the host name or IP address of the target system, the subnetwork that all target systems can use to access the ISO image, or the asterisk sign (*) if you want to allow any system with network access to the NFS server to use the ISO image. See the exports(5) man page for detailed information about the format of this field.

    A basic configuration that makes the /rhel9-install/ directory available as read-only to all clients is:

    /rhel9-install *
  5. Save the /etc/exports file and exit the text editor.
  6. Start the nfs service:

    # systemctl start nfs-server.service

    If the service was running before you changed the /etc/exports file, run the following command for the running NFS server to reload its configuration:

    # systemctl reload nfs-server.service

    The ISO image is now accessible over NFS and ready to be used as an installation source.

Note

When configuring the installation source, use nfs: as the protocol, the server host name or IP address, the colon sign (:), and the directory holding the ISO image. For example, if the server host name is myserver.example.com and you have saved the ISO image in /rhel9-install/, specify nfs:myserver.example.com:/rhel9-install/ as the installation source.

1.5.5. Creating an installation source using HTTP or HTTPS

Follow the steps in this procedure to create an installation source for a network-based installation using an installation tree, which is a directory containing extracted contents of the DVD ISO image and a valid .treeinfo file. The installation source is accessed over HTTP or HTTPS.

Prerequisites

  • You have administrator level access to a server with Red Hat Enterprise Linux 9, and this server is on the same network as the system to be installed.
  • You have downloaded a Binary DVD image. See Downloading the installation ISO image from the Performing a standard RHEL 9 installation document for more information.
  • You have created a bootable CD, DVD, or USB device from the image file. See Creating installation media from the Performing a standard RHEL 9 installation document for more information.
  • You have verified that your firewall allows the system you are installing to access the remote installation source. See Ports for network-based installation from the Performing a standard RHEL 9 installation document for more information.

Procedure

  1. To create an installation source using http, install the httpd package:

    # dnf install httpd

    To create an installation source using https, install httpd and mod_ssl packages:

    # dnf install httpd mod_ssl
    Warning

    If your Apache web server configuration enables SSL security, verify that you enable only the TLSv1 protocol, and disable SSLv2 and SSLv3. This is due to the POODLE SSL vulnerability (CVE-2014-3566). See https://access.redhat.com/solutions/1232413 for details.

    Important

    If you use an HTTPS server with a self-signed certificate, you must boot the installation program with the noverifyssl option.

  2. Copy the DVD ISO image to the HTTP(S) server.
  3. Mount the DVD ISO image, using the mount command, to a suitable directory:

    # mkdir /mnt/rhel9-install/
    # mount -o loop,ro -t iso9660 /image_directory/image.iso /mnt/rhel9-install/

    Replace /image_directory/image.iso with the path to the DVD ISO image.

  4. Copy the files from the mounted image to the HTTP(S) server root. This command creates the /var/www/html/rhel9-install/ directory with the contents of the image.

    # cp -r /mnt/rhel9-install/ /var/www/html/

    This command creates the /var/www/html/rhel9-install/ directory with the content of the image. Note that some copying methods can skip the .treeinfo file which is required for a valid installation source. Running the cp command for whole directories as shown in this procedure will copy .treeinfo correctly.

  5. Start the httpd service:

    # systemctl start httpd.service

    The installation tree is now accessible and ready to be used as the installation source.

Note

When configuring the installation source, use http:// or https:// as the protocol, the server host name or IP address, and the directory that contains the files from the ISO image, relative to the HTTP server root. For example, if you are using HTTP, the server host name is myserver.example.com, and you have copied the files from the image to /var/www/html/rhel9-install/, specify http://myserver.example.com/rhel9-install/ as the installation source.

1.5.6. Creating an installation source using FTP

Follow the steps in this procedure to create an installation source for a network-based installation using an installation tree, which is a directory containing extracted contents of the DVD ISO image and a valid .treeinfo file. The installation source is accessed over FTP.

Prerequisites

  • You have administrator level access to a server with Red Hat Enterprise Linux 9, and this server is on the same network as the system to be installed.
  • You have downloaded a Binary DVD image. See Downloading the installation ISO image from the Performing a standard RHEL 9 installation document for more information.
  • You have created a bootable CD, DVD, or USB device from the image file. See Creating installation media from the Performing a standard RHEL 9 installation document for more information.
  • You have verified that your firewall allows the system you are installing to access the remote installation source. See Ports for network-based installation from the Performing a standard RHEL 9 installation document for more information.

Procedure

  1. Install the vsftpd package by running the following command as root:

    # dnf install vsftpd
  2. Open and edit the /etc/vsftpd/vsftpd.conf configuration file in a text editor.

    1. Change the line anonymous_enable=NO to anonymous_enable=YES
    2. Change the line write_enable=YES to write_enable=NO.
    3. Add lines pasv_min_port=min_port and pasv_max_port=max_port. Replace min_port and max_port with the port number range used by FTP server in passive mode, e. g. 10021 and 10031.

      This step can be necessary in network environments featuring various firewall/NAT setups.

    4. Optionally, add custom changes to your configuration. For available options, see the vsftpd.conf(5) man page. This procedure assumes that default options are used.

      Warning

      If you configured SSL/TLS security in your vsftpd.conf file, ensure that you enable only the TLSv1 protocol, and disable SSLv2 and SSLv3. This is due to the POODLE SSL vulnerability (CVE-2014-3566). See https://access.redhat.com/solutions/1234773 for details.

  3. Configure the server firewall.

    1. Enable the firewall:

      # systemctl enable firewalld
      # systemctl start firewalld
    2. Enable in your firewall the FTP port and port range from previous step:

      # firewall-cmd --add-port min_port-max_port/tcp --permanent
      # firewall-cmd --add-service ftp --permanent
      # firewall-cmd --reload

      Replace min_port-max_port with the port numbers you entered into the /etc/vsftpd/vsftpd.conf configuration file.

  4. Copy the DVD ISO image to the FTP server.
  5. Mount the DVD ISO image, using the mount command, to a suitable directory:

    # mkdir /mnt/rhel9-install
    # mount -o loop,ro -t iso9660 /image-directory/image.iso /mnt/rhel9-install

    Replace /image-directory/image.iso with the path to the DVD ISO image.

  6. Copy the files from the mounted image to the FTP server root:

    # mkdir /var/ftp/rhel9-install
    # cp -r /mnt/rhel9-install/ /var/ftp/

    This command creates the /var/ftp/rhel9-install/ directory with the content of the image. Note that some copying methods can skip the .treeinfo file which is required for a valid installation source. Running the cp command for whole directories as shown in this procedure will copy .treeinfo correctly.

  7. Make sure that the correct SELinux context and access mode is set on the copied content:

    # restorecon -r /var/ftp/rhel9-install
    # find /var/ftp/rhel9-install -type f -exec chmod 444 {} \;
    # find /var/ftp/rhel9-install -type d -exec chmod 755 {} \;
  8. Start the vsftpd service:

    # systemctl start vsftpd.service

    If the service was running before you changed the /etc/vsftpd/vsftpd.conf file, restart the service to load the edited file:

    # systemctl restart vsftpd.service

    Enable the vsftpd service to start during the boot process:

    # systemctl enable vsftpd

    The installation tree is now accessible and ready to be used as the installation source.

    Note

    When configuring the installation source, use ftp:// as the protocol, the server host name or IP address, and the directory in which you have stored the files from the ISO image, relative to the FTP server root. For example, if the server host name is myserver.example.com and you have copied the files from the image to /var/ftp/rhel9-install/, specify ftp://myserver.example.com/rhel9-install/ as the installation source.

1.5.7. Preparing a hard drive as an installation source

This module describes how to install RHEL using a hard drive as an installation source with ext2, ext3, ext4, or XFS file systems. You can use this method for the systems without network access and the optical drive. Hard drive installations use an ISO image of the installation DVD. An ISO image is a file that contains an exact copy of the content of a DVD. With this file present on a hard drive, you can choose Hard drive as the installation source when you boot the installation program.

  • To check the file system of a hard drive partition on a Windows operating system, use the Disk Management tool.
  • To check the file system of a hard drive partition on a Linux operating system, use the parted tool.
Note

You cannot use ISO files on LVM (Logical Volume Management) partitions.

Procedure

  1. Download an ISO image of the Red Hat Enterprise Linux installation DVD. Alternatively, if you have the DVD on physical media, you can create an image of an ISO with the following command on a Linux system:

    dd if=/dev/dvd of=/path_to_image/name_of_image.iso

    where dvd is your DVD drive device name, name_of_image is the name you give to the resulting ISO image file, and path_to_image is the path to the location on your system where you want to store the image.

  2. Copy and paste the ISO image onto the system hard drive or a USB drive.
  3. Use a SHA256 checksum program to verify that the ISO image that you copied is intact. Many SHA256 checksum programs are available for various operating systems. On a Linux system, run:

    $ sha256sum /path_to_image/name_of_image.iso

    where name_of_image is the name of the ISO image file. The SHA256 checksum program displays a string of 64 characters called a hash. Compare this hash to the hash displayed for this particular image on the Downloads page in the Red Hat Customer Portal. The two hashes should be identical.

  4. Specify the HDD installation source on the kernel command line before starting the installation:

    inst.repo=hd:<device>:/path_to_image/name_of_image.iso

1.6. Preparing to install from the network using PXE

This section describes how to configure TFTP and DHCP on a PXE server to enable PXE boot and network installation.

1.6.1. Network install overview

A network installation allows you to install Red Hat Enterprise Linux to a system that has access to an installation server. At a minimum, two systems are required for a network installation:

PXE Server
A system running a DHCP server, a TFTP server, and an HTTP, HTTPS, FTP, or NFS server. While each server can run on a different physical system, the procedures in this section assume a single system is running all servers.
Client
The system to which you are installing Red Hat Enterprise Linux. Once installation starts, the client queries the DHCP server, receives the boot files from the TFTP server, and downloads the installation image from the HTTP, HTTPS, FTP or NFS server. Unlike other installation methods, the client does not require any physical boot media for the installation to start.
Note

To boot a client from the network, configure it in BIOS/UEFI or a quick boot menu. On some hardware, the option to boot from a network might be disabled, or not available.

The workflow steps to prepare to install Red Hat Enterprise Linux from a network using PXE are as follows:

Steps

  1. Export the installation ISO image or the installation tree to an NFS, HTTPS, HTTP, or FTP server.
  2. Configure the TFTP server and DHCP server, and start the TFTP service on the PXE server.
  3. Boot the client and start the installation.
Important

The GRUB2 boot loader supports a network boot from HTTP in addition to a TFTP server. Sending the boot files, which are the kernel and initial RAM disk vmlinuz and initrd, over this protocol might be slow and result in timeout failures. An HTTP server does not carry this risk, but it is recommended that you use a TFTP server when sending the boot files.

1.6.2. Configuring a TFTP server for BIOS-based clients

Use this procedure to configure a TFTP server and DHCP server and start the TFTP service on the PXE server for BIOS-based AMD and Intel 64-bit systems.

Important

All configuration files in this section are examples. Configuration details vary and are dependent on the architecture and specific requirements.

Procedure

  1. As root, install the following packages. If you already have a DHCP server configured in your network, exclude the dhcp-server packages:

    # dnf install tftp-server dhcp-server
  2. Allow incoming connections to the tftp service in the firewall:

    # firewall-cmd --add-service=tftp
    Note
    • This command enables temporary access until the next server reboot. To enable permanent access, add the --permanent option to the command.
    • Depending on the location of the installation ISO file, you might have to allow incoming connections for HTTP or other services.
  3. Configure your DHCP server to use the boot images packaged with SYSLINUX as shown in the following example /etc/dhcp/dhcpd.conf file. Note that if you already have a DHCP server configured, then perform this step on the DHCP server.

    option space pxelinux;
    option pxelinux.magic code 208 = string;
    option pxelinux.configfile code 209 = text;
    option pxelinux.pathprefix code 210 = text;
    option pxelinux.reboottime code 211 = unsigned integer 32;
    option architecture-type code 93 = unsigned integer 16;
    
    subnet 10.0.0.0 netmask 255.255.255.0 {
    	option routers 10.0.0.254;
    	range 10.0.0.2 10.0.0.253;
    
    	class "pxeclients" {
    	  match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
    	  next-server 10.0.0.1;
    
    	  if option architecture-type = 00:07 {
    	    filename "BOOTX64.efi";
    	    } else {
    	    filename "pxelinux/pxelinux.0";
    	  }
    	}
    }
  4. Access the pxelinux.0 file from the SYSLINUX package in the DVD ISO image file, where my_local_directory is the name of the directory that you create:

    # mount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,ro
    # cp -pr /mount_point/BaseOS/Packages/syslinux-tftpboot-version-architecture.rpm /my_local_directory
    # umount /mount_point
  5. Extract the package:

    # rpm2cpio syslinux-tftpboot-version-architecture.rpm | cpio -dimv
  6. Create a pxelinux/ directory in tftpboot/ and copy all the files from the directory into the pxelinux/ directory:

    # mkdir /var/lib/tftpboot/pxelinux
    # cp my_local_directory/tftpboot/* /var/lib/tftpboot/pxelinux
  7. Create the directory pxelinux.cfg/ in the pxelinux/ directory:

    # mkdir /var/lib/tftpboot/pxelinux/pxelinux.cfg
  8. Create a configuration file named default and add it to the pxelinux.cfg/ directory as shown in the following example:

    default vesamenu.c32
    prompt 1
    timeout 600
    
    display boot.msg
    
    label linux
      menu label ^Install system
      menu default
      kernel images/RHEL-9/vmlinuz
      append initrd=images/RHEL-9/initrd.img ip=dhcp inst.repo=http://10.32.5.1/RHEL-9/x86_64/iso-contents-root/
    label vesa
      menu label Install system with ^basic video driver
      kernel images/RHEL-9/vmlinuz
      append initrd=images/RHEL-9/initrd.img ip=dhcp inst.xdriver=vesa nomodeset inst.repo=http://10.32.5.1/RHEL-9/x86_64/iso-contents-root/
    label rescue
      menu label ^Rescue installed system
      kernel images/RHEL-9/vmlinuz
      append initrd=images/RHEL-9/initrd.img rescue
    label local
      menu label Boot from ^local drive
      localboot 0xffff
    Note
    • The installation program cannot boot without its runtime image. Use the inst.stage2 boot option to specify location of the image. Alternatively, you can use the inst.repo= option to specify the image as well as the installation source.
    • The installation source location used with inst.repo must contain a valid .treeinfo file.
    • When you select the RHEL9 installation DVD as the installation source, the .treeinfo file points to the BaseOS and the AppStream repositories. You can use a single inst.repo option to load both repositories.
  9. Create a subdirectory to store the boot image files in the /var/lib/tftpboot/ directory, and copy the boot image files to the directory. In this example, the directory is /var/lib/tftpboot/pxelinux/images/RHEL-9/:

    # mkdir -p /var/lib/tftpboot/pxelinux/images/RHEL-9/
    # cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/images/RHEL-9/
  10. On the DHCP server, start and enable the dhcpd service. If you have configured a DHCP server on the localhost, then start and enable the dhcpd service on the localhost.

    # systemctl start dhcpd
    # systemctl enable dhcpd
  11. Start and enable the tftp.socket service:

    # systemctl start tftp.socket
    # systemctl enable tftp.socket

    The PXE boot server is now ready to serve PXE clients. You can start the client, which is the system to which you are installing Red Hat Enterprise Linux, select PXE Boot when prompted to specify a boot source, and start the network installation.

1.6.3. Configuring a TFTP server for UEFI-based clients

Use this procedure to configure a TFTP server and DHCP server and start the TFTP service on the PXE server for UEFI-based AMD64, Intel 64, and 64-bit ARM systems.

Important
  • All configuration files in this section are examples. Configuration details vary and are dependent on the architecture and specific requirements.
  • Red Hat Enterprise Linux 9 UEFI PXE boot supports a lowercase file format for a MAC-based grub menu file. For example, the MAC address file format for grub2 is grub.cfg-01-aa-bb-cc-dd-ee-ff

Procedure

  1. As root, install the following packages. If you already have a DHCP server configured in your network, exclude the dhcp-server packages.

    # dnf install tftp-server dhcp-server
  2. Allow incoming connections to the tftp service in the firewall:

    # firewall-cmd --add-service=tftp
    Note
    • This command enables temporary access until the next server reboot. To enable permanent access, add the --permanent option to the command.
    • Depending on the location of the installation ISO file, you might have to allow incoming connections for HTTP or other services.
  3. Configure your DHCP server to use the boot images packaged with shim as shown in the following example /etc/dhcp/dhcpd.conf file. Note that if you already have a DHCP server configured, then perform this step on the DHCP server.

    option space pxelinux;
    option pxelinux.magic code 208 = string;
    option pxelinux.configfile code 209 = text;
    option pxelinux.pathprefix code 210 = text;
    option pxelinux.reboottime code 211 = unsigned integer 32;
    option architecture-type code 93 = unsigned integer 16;
    
    subnet 10.0.0.0 netmask 255.255.255.0 {
    	option routers 10.0.0.254;
    	range 10.0.0.2 10.0.0.253;
    
    	class "pxeclients" {
    	  match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
    	  next-server 10.0.0.1;
    
    	  if option architecture-type = 00:07 {
    	    filename "BOOTX64.efi";
    	  } else {
    	    filename "pxelinux/pxelinux.0";
    		}
      }
    }
  4. Access the BOOTX64.efi file from the shim package, and the grubx64.efi file from the grub2-efi package in the DVD ISO image file where my_local_directory is the name of the directory that you create:

    # mount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,ro
    # cp -pr /mount_point/BaseOS/Packages/shim-version-architecture.rpm /my_local_directory
    # cp -pr /mount_point/BaseOS/Packages/grub2-efi-version-architecture.rpm /my_local_directory
    # umount /mount_point
  5. Extract the packages:

    # rpm2cpio shim-version-architecture.rpm | cpio -dimv
    # rpm2cpio grub2-efi-version-architecture.rpm | cpio -dimv
  6. Copy the EFI boot images from your boot directory. Replace ARCH with shim or grub followed by the architecture, for example, grubx64.

    # mkdir /var/lib/tftpboot/uefi
    # cp my_local_directory/boot/efi/EFI/redhat/ARCH.efi /var/lib/tftpboot/uefi/
  7. Add a configuration file named grub.cfg to the tftpboot/ directory as shown in the following example:

    set timeout=60
    menuentry 'RHEL 9' {
      linuxefi images/RHEL-9.x/vmlinuz ip=dhcp inst.repo=http://10.32.5.1/RHEL-9.x/x86_64/iso-contents-root/
      initrdefi images/RHEL-9.x/initrd.img
    }
    Note
    • The installation program cannot boot without its runtime image. Use the inst.stage2 boot option to specify location of the image. Alternatively, you can use the inst.repo= option to specify the image as well as the installation source.
    • The installation source location used with inst.repo must contain a valid .treeinfo file.
    • When you select the RHEL9 installation DVD as the installation source, the .treeinfo file points to the BaseOS and the AppStream repositories. You can use a single inst.repo option to load both repositories.
  8. Create a subdirectory to store the boot image files in the /var/lib/tftpboot/ directory, and copy the boot image files to the directory. In this example, the directory is /var/lib/tftpboot/images/RHEL-9.x/:

    # mkdir -p /var/lib/tftpboot/images/RHEL-9/
    # cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/images/RHEL-9/
  9. On the DHCP server, start and enable the dhcpd service. If you have configured a DHCP server on the localhost, then start and enable the dhcpd service on the localhost.

    # systemctl start dhcpd
    # systemctl enable dhcpd
  10. Start and enable the tftp.socket service:

    # systemctl start tftp.socket
    # systemctl enable tftp.socket

    The PXE boot server is now ready to serve PXE clients. You can start the client, which is the system to which you are installing Red Hat Enterprise Linux, select PXE Boot when prompted to specify a boot source, and start the network installation.

Additional resources

1.6.4. Configuring a network server for IBM Power systems

Use this procedure to configure a network boot server for IBM Power systems using GRUB2.

Important

All configuration files in this section are examples. Configuration details vary and are dependent on the architecture and specific requirements.

Procedure

  1. As root, install the following packages. If you already have a DHCP server configured in your network, exclude the dhcp-server packages.

    # dnf install tftp-server dhcp-server
  2. Allow incoming connections to the tftp service in the firewall:

    # firewall-cmd --add-service=tftp
    Note
    • This command enables temporary access until the next server reboot. To enable permanent access, add the --permanent option to the command.
    • Depending on the location of the installation ISO file, you might have to allow incoming connections for HTTP or other services.
  3. Create a GRUB2 network boot directory inside the tftp root:

    # grub2-mknetdir --net-directory=/var/lib/tftpboot
    Netboot directory for powerpc-ieee1275 created. Configure your DHCP server to point to /boot/grub2/powerpc-ieee1275/core.elf
    Note

    The command output informs you of the file name that needs to be configured in your DHCP configuration, described in this procedure.

    1. If the PXE server runs on an x86 machine, the grub2-ppc64-modules must be installed before creating a GRUB2 network boot directory inside the tftp root:

      # dnf install grub2-ppc64-modules
  4. Create a GRUB2 configuration file: /var/lib/tftpboot/boot/grub2/grub.cfg as shown in the following example:

    set default=0
    set timeout=5
    
    echo -e "\nWelcome to the Red Hat Enterprise Linux 9 installer!\n\n"
    
    menuentry 'Red Hat Enterprise Linux 9' {
      linux grub2-ppc64/vmlinuz ro ip=dhcp inst.repo=http://10.32.5.1/RHEL-9/x86_64/iso-contents-root/
      initrd grub2-ppc64/initrd.img
    }
    Note
    • The installation program cannot boot without its runtime image. Use the inst.stage2 boot option to specify location of the image. Alternatively, you can use the inst.repo= option to specify the image as well as the installation source.
    • The installation source location used with inst.repo must contain a valid .treeinfo file.
    • When you select the RHEL8 installation DVD as the installation source, the .treeinfo file points to the BaseOS and the AppStream repositories. You can use a single inst.repo option to load both repositories.
  5. Mount the DVD ISO image using the command:

    # mount -t iso9660 /path_to_image/name_of_iso/ /mount_point -o loop,ro
  6. Create a directory and copy the initrd.img and vmlinuz files from DVD ISO image into it, for example:

    # cp /mount_point/ppc/ppc64/{initrd.img,vmlinuz} /var/lib/tftpboot/grub2-ppc64/
  7. Configure your DHCP server to use the boot images packaged with GRUB2 as shown in the following example. Note that if you already have a DHCP server configured, then perform this step on the DHCP server.

    subnet 192.168.0.1 netmask 255.255.255.0 {
      allow bootp;
      option routers 192.168.0.5;
      group { #BOOTP POWER clients
        filename "boot/grub2/powerpc-ieee1275/core.elf";
        host client1 {
        hardware ethernet 01:23:45:67:89:ab;
        fixed-address 192.168.0.112;
        }
      }
    }
  8. Adjust the sample parameters subnet, netmask, routers, fixed-address and hardware ethernet to fit your network configuration. Note the file name parameter; this is the file name that was outputted by the grub2-mknetdir command earlier in this procedure.
  9. On the DHCP server, start and enable the dhcpd service. If you have configured a DHCP server on the localhost, then start and enable the dhcpd service on the localhost.

    # systemctl start dhcpd
    # systemctl enable dhcpd
  10. Start and enable the tftp.socket service:

    # systemctl start tftp.socket
    # systemctl enable tftp.socket

    The PXE boot server is now ready to serve PXE clients. You can start the client, which is the system to which you are installing Red Hat Enterprise Linux, select PXE Boot when prompted to specify a boot source, and start the network installation.

1.7. 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.

Prerequisites

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

1.7.1. Installing Apache on RHEL

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

Prerequisites

  • Access to a repo with Apache webserver

Procedure

  1. Install the httpd package

    # dnf 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.

    http://<the-apache-ip-address>
    
    http://<the-apache-hostname>

1.7.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.

Prerequisites

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

Procedure

  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
    
    [BaseOS_repo_http]
    name=RHEL_9_x86_64_HTTP BaseOS
    baseurl="http://myhost/rhel9/BaseOS"
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [AppStream_repo_http]
    name=RHEL_9_x86_64_HTTP AppStream
    baseurl="http://myhost/rhel9/AppStream"
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [root@localhost ~]# dnf 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_9_x86_64_HTTP AppStream                                                   4,672
    BaseOS_repo_http                                                     RHEL_9_x86_64_HTTP BaseOS                                                      1,658
    [root@localhost ~]#