.. _Preparing Environment: Preparing Environment --------------------- This section explains how to set up the environment for installation over network. .. _Installing PXE Components: Installing PXE Components ~~~~~~~~~~~~~~~~~~~~~~~~~ You will need these components to set up a PXE environment: - TFTP server. This is a machine that allows your servers to boot and install |product_name| over the network. Any machine that can run Linux and is accessble over network can be a TFTP server. - DHCP server. This is a standard DHCP machine serving TCP/IP settings to computers on your network. - HTTP server. This is a machine serving |product_name| installation files over network. You can also share |product_name| distribution over network via FTP (e.g., with ``vsftpd``) or NFS. The easiest way is to set up all of these on the same physical machine: :: # yum install tftp-server syslinux httpd dhcp You can also use servers that already exist in your infrastructure. For example, skip ``httpd`` and ``dhcp`` if you already have the HTTP and DHCP servers. .. _Configuring TFTP Server: Configuring TFTP Server ~~~~~~~~~~~~~~~~~~~~~~~ This section describes how to configure the TFTP server for BIOS-based systems. For information on how to configure it for installing |product_name| on EFI-based systems, see the `Red Hat Enterprise Linux Installation Guide `__. Do the following: #. On the server, open the ``/etc/xinetd.d/tftp`` file, and edit it as follows: :: service tftp { disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -v -s /tftpboot per_source = 11 cps = 100 2 flags = IPv4 } Once you are done, save the file. #. Create the ``/tftpboot`` directory and copy the following files to it: ``vmlinuz``, ``initrd.img``, ``menu.c32``, ``pxelinux.0``. These files are necessary to start installation. You can find the first two in the ``/images/pxeboot`` directory of the |product_name| distribution. The last two files are located in the ``syslinux`` directory (usually ``/usr/share/syslinux`` or ``/usr/lib/syslinux``). #. Create the ``/tftpboot/pxelinux.cfg`` directory and make the ``default`` file in it. :: # mkdir /tftpboot/pxelinux.cfg # touch /tftpboot/pxelinux.cfg/default #. Add the following lines to ``default``: :: default menu.c32 prompt 0 timeout 100 ontimeout INSTALL menu title Boot Menu label INSTALL menu label Install kernel vmlinuz append initrd=initrd.img ip=dhcp For detailed information on parameters you can specify in this file, see the documentation for ``syslinux``. #. Restart the ``xinetd`` service: :: # /etc/init.d/xinetd restart #. If necessary, configure firewall to allow access to the TFTP server (on port 69 by default). When running the TFTP server, you might get the "Permission denied" error. In this case, you may try to fix the problem by running the following command: ``# restorecon -Rv /tftboot/``. .. _Setting Up DHCP Server: Setting Up DHCP Server ~~~~~~~~~~~~~~~~~~~~~~ To set up a DHCP server for installing |product_name| over network, add the following strings to the ``dhcpd.conf`` file, which is usually located in the ``/etc`` or ``/etc/dhcp`` directory: :: next-server ; filename "/pxelinux.0"; To configure a DHCP server for installation on EFI-based systems, specify ``filename "/bootx64.efi"`` instead of ``filename "/pxelinux.0"`` in the ``dhcpd.conf`` file, where ``/bootx64.efi`` is the directory to which you copied the EFI boot images when setting up the TFTP server. .. _Setting Up HTTP Server: Setting Up HTTP Server ~~~~~~~~~~~~~~~~~~~~~~ Now that you have set up the TFTP and DHCP servers, you need to make the |product_name| distribution files available for installation over the network. To do this: #. Set up an HTTP server (or configure one you already have). #. Copy the contents of your |product_name| installation DVD to some directory on the HTTP server (e.g., ``/var/www/html/distrib``). #. On the PXE server, open the ``/tftpboot/pxelinux.cfg/default`` file for editing, and specify the path to the |product_name| installation files on the HTTP server. .. include:: /includes/using-kickstart-file-part1.inc Assuming that you have the installation files in the ``/var/www/html/distrib`` directory on the HTTP server with the IP address of 198.123.123.198 and the ``DocumentRoot`` directory is set to ``/var/www/html``, you can add the following option to the ``append`` line of the ``default`` file to make the |product_name| files accessible over HTTP: :: inst.repo=http://198.123.123.198/distrib So your default file should look similar to the following: :: default menu.c32 prompt 0 timeout 100 ontimeout INSTALL menu title Boot Menu label INSTALL menu label Install kernel vmlinuz append initrd=initrd.img ip=dhcp inst.repo=http://198.123.123.198/distrib