11.3. Sharing the installation files on an FTP server
You can store Kickstart files on an FTP server to enable automated installations across multiple systems. It eliminates the need for physical media and provides centralized management of installation configurations for efficient system deployment by using the FTP protocol.
Prerequisites
- You have administrator-level access to a server with Red Hat Enterprise Linux 10 on the local network.
- The system to be installed can connect to the server.
Procedure
Install the
vsftpdpackage by running the following command as root:# 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_portandpasv_max_port=max_port. Replacemin_portandmax_portwith the port number range used by the FTP server in passive mode, for example,10021and10031.This step can 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.
-
Change the line
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-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-
Copy the Kickstart file to the FTP server into the
/var/ftp/directory or its subdirectory. Ensure that the correct SELinux context and access mode is set on the file:
# restorecon -r /var/ftp/your-kickstart-file.ks # chmod 444 /var/ftp/your-kickstart-file.ksStart 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 Kickstart file is now accessible and ready to be used for installations by systems on the same network.
注記When configuring the installation source, use
ftp://as the protocol, the server’s host name or IP address, and the path of the Kickstart file, relative to the FTP server root. For example, if the server’s host name ismyserver.example.comand you have copied the file to/var/ftp/my-ks.cfg, specifyftp://myserver.example.com/my-ks.cfgas the installation source.