5.3. Creating an installation source by using FTP
You can set up an FTP server to host RHEL installation files for network-based installations. It enables multiple systems to install from a centralized source, providing efficient deployment across your network infrastructure using the FTP protocol.
Prerequisites
- You have administrator-level access to a server with Red Hat Enterprise Linux 10, and this server is on the same network as the system to be installed.
- You have downloaded the full installation DVD ISO from the Product Downloads page.
-
The
vsftpdpackage is installed.
Procedure
Install the vsftpd package.
# dnf install vsftpdOpen and edit the
/etc/vsftpd/vsftpd.confconfiguration file in a text editor.-
Change the line
anonymous_enable=NOtoanonymous_enable=YES -
Change the line
write_enable=YEStowrite_enable=NO. Add lines
pasv_min_port=<min_port>andpasv_max_port=<max_port>. Replace <min_port> and <max_port> with the port number range used by the FTP server in passive mode, for example,10000and11000.This step might be necessary in network environments featuring various firewall/NAT setups.
- Optional: Add custom changes to your configuration. For available options, see the vsftpd.conf(5) man page. This procedure assumes that default options are used.
Configure the firewall to allow the FTP port and port range from the previous step:
# firewall-cmd --add-port min_port-max_port/tcp --permanentReplace <min_port> and <max_port> with the port numbers you entered into the
/etc/vsftpd/vsftpd.confconfiguration file.Configure the firewall to allow FTP service
# firewall-cmd --add-service ftp --permanentReload the firewall to apply the new rules:
# firewall-cmd --reload
-
Change the line
- Copy the DVD ISO image to the FTP server.
Create a suitable directory for mounting the DVD ISO image, for example:
# mkdir /mnt/rhel10-installMount the DVD ISO image to the directory:
# mount -o loop,ro -t iso9660 /image-directory/image.iso /mnt/rhel10-installReplace
/image-directory/image.isowith the path to the DVD ISO image.Copy the files from the mounted image to the FTP server root:
# cp -r /mnt/rhel10-install/ /var/ftp/This command creates the
/var/ftp/rhel10-install/directory with the content of the image. Some copying methods can skip the.treeinfofile which is required for a valid installation source. Entering thecpcommand for whole directories as shown in this procedure will copy.treeinfocorrectly.Start the
vsftpdservice:# systemctl enable --now vsftpd.serviceIf the service was running before you changed the
/etc/vsftpd/vsftpd.conffile, restart the service to load the edited file:# systemctl restart vsftpd.serviceThe installation tree is now accessible and ready to be used as the installation source.
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 ismyserver.example.comand you have copied the files from the image to/var/ftp/rhel10-install/, specifyftp://myserver.example.com/rhel10-install/as the installation source.