Installation Source on a Network

Placing the installation source on a network has the advantage of allowing you to install multiple systems from a single source, without having to connect and disconnect any physical media. Network-based installations can be especially useful when used together with a TFTP server, which allows you to boot the installation program from the network as well. This approach completely eliminates the need for creating physical media, allowing easy deployment of CentOS on multiple systems at the same time. For further information about setting up a TFTP server, see Preparing for a Network Installation.

Installation Source on an NFS Server

The NFS installation method uses an ISO image of the CentOS binary DVD placed in a Network File System server’s exported directory, which the installation system must be able to read. To perform an NFS-based installation, you will need another running system which will act as the NFS host.

For more information about NFS servers, see the Red Hat Enterprise Linux 7 Storage Administration Guide.

The following procedure is only meant as a basic outline of the process. The precise steps you must take to set up an NFS server will vary based on the system’s architecture, operating system, package manager, service manager, and other factors. On CentOS 7.6.1810 systems, the procedure can be followed exactly as documented. For procedures describing the installation source creation process on earlier releases of CentOS, see the appropriate Installation Guide for that release.

Preparing for Installation Using NFS
  1. Install the nfs-utils package by running the following command as root:

    # yum install nfs-utils
  2. Copy the full CentOS 7.6.1810 binary DVD ISO image to a suitable directory on the NFS server. For example, you can create directory /CentOS-install/ for this purpose and save the ISO image here.

  3. Open the /etc/exports file using a text editor and add a line with the following syntax:

    /exported_directory/ clients

    Replace /exported_directory/ with the full path to the directory holding the ISO image. Instead of clients, use the host name or IP address of the computer which is to be installed from this NFS server, the subnetwork from which all computers are to have access the ISO image, or the asterisk sign (*) if you want to allow any computer 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.

    The following is a basic configuration which makes the /CentOS-install/ directory available as read-only to all clients:

    /CentOS-install *
  4. Save the /etc/exports file after finishing the configuration and exit the text editor.

  5. Start the nfs service:

    # systemctl start nfs.service

    If the service was already running before you changed the /etc/exports file, enter the following command instead, in order for the running NFS server to reload its configuration:

    # systemctl reload nfs.service

After completing the procedure above, the ISO image is accessible over NFS and ready to be used as an installation source.

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

Installation Source on an HTTP, HTTPS or FTP Server

This installation method allows for a network-based installation using an installation tree, which is a directory containing extracted contents of the binary DVD ISO image and a valid .treeinfo file. The installation source is accessed over HTTP, HTTPS, or FTP.

For more information about HTTP and FTP servers, see the CentOS 7 System Administrator’s Guide.

The following procedure is only meant as a basic outline of the process. The precise steps you must take to set up an FTP server will vary based on the system’s architecture, operating system, package manager, service manager, and other factors. On CentOS 7.6.1810 systems, the procedure can be followed exactly as documented. For procedures describing the installation source creation process on earlier releases of CentOS, see the appropriate Installation Guide for that release.

Preparing Installation Using HTTP or HTTPS
  1. Install the httpd package by running the following command as root:

    # yum install httpd

    An HTTPS server needs additional configuration. For detailed information, see section Setting Up an SSL Server in the Red Hat Enterprise Linux 7 System Administrator’s Guide. However, HTTPS is not necessary in most cases, because no sensitive data is sent between the installation source and the installer, and HTTP is sufficient.

    If your Apache web server configuration enables SSL security, make sure to only enable 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.

    If you decide to use HTTPS and the server is using a self-signed certificate, you must boot the installer with the noverifyssl option.

  2. Copy the full CentOS 7.6.1810 binary DVD ISO image to the HTTP(S) server.

  3. Mount the binary DVD ISO image, using the mount command, to a suitable directory:

    # mount -o loop,ro -t iso9660 /image_directory/image.iso /mount_point/

    Replace /image_directory/image.iso with the path to the binary DVD ISO image, and /mount_point/ with the path to the directory in which you want the content of the ISO image to appear. For example, you can create directory /mnt/CentOS-install/ for this purpose and use that as the parameter of the mount command.

  4. Copy the files from the mounted image to the HTTP server root.

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

    This command creates the /var/www/html/CentOS-install/ directory with the content of the image.

  5. Start the httpd service:

    # systemctl start httpd.service

After completing the procedure above, the installation tree is accessible and ready to be used as the installation source.

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

Preparing for Installation Using FTP
  1. Install the vsftpd package by running the following command as root:

    # yum install vsftpd
  2. Optionally, open the /etc/vsftpd/vsftpd.conf configuration file in a text editor, and edit any options you want to change. For available options, see the vsftpd.conf(5) man page. The rest of this procedure assumes that default options are used; notably, to follow the rest of the procedure, anonymous users of the FTP server must be permitted to download files.

    If you configured SSL/TLS security in your vsftpd.conf file, make sure to only enable 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. Copy the full CentOS 7.6.1810 binary DVD ISO image to the FTP server.

  4. Mount the binary DVD ISO image, using the mount command, to a suitable directory:

    # mount -o loop,ro -t iso9660 /image_directory/image.iso /mount_point

    Replace /image_directory/image.iso with the path to the binary DVD ISO image, and /mount_point with the path to the directory in which you want the content of the ISO image to appear. For example, you can create directory /mnt/CentOS-install/ for this purpose and use that as the parameter of the mount command.

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

    # cp -r /mnt/CentOS-install/ /var/ftp/

    This command creates the /var/ftp/CentOS-install/ directory with the content of the image.

  6. Start the vsftpd service:

    # systemctl start vsftpd.service

    If the service was already running before you changed the /etc/vsftpd/vsftpd.conf file, restart it to ensure the edited file is loaded. To restart, execute the following command:

    # systemctl restart vsftpd.service

After completing the procedure above, the installation tree is accessible and ready to be used as the installation source.

When configuring the installation source before or during the installation, use ftp:// as the protocol, the server’s 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’s host name is myserver.example.com and you have copied the files from the image to /var/ftp/CentOS-install/, specify ftp://myserver.example.com/CentOS-install/ as the installation source.

Firewall Considerations for Network-based Installations

When using a network-based installation source, make sure that your firewall allows the server you are installing to access the remote installation source. The following table shows which ports must be open for each type of network-based installation

Table 1. Ports Used by Network Protocols
Protocol used Ports to open

FTP

21

HTTP

80

HTTPS

443

NFS

2049, 111, 20048

TFTP

69

For information about opening specific firewall ports, see the Red Hat Enterprise Linux 7 Security Guide.