6.4. Configuring the HTTP server for HTTP boot


You must install and enable the httpd service on your server so that the server can provide HTTP boot resources on your network.

Prerequisites

  • Find the network addresses of the server.

    In the following examples, the server has a network card with the 192.168.124.2 IPv4 address.

Procedure

  1. Install the HTTP server:

    # dnf install httpd
  2. Create the /var/www/html/redhat directory:

    # mkdir -p /var/www/html/redhat
  3. Download the RHEL DVD ISO file. See All Red Hat Enterprise Linux Downloads.
  4. Create a mount point for the ISO file:

    # mkdir -p /var/www/html/redhat/iso
  5. Mount the ISO file:

    # mount -o loop,ro -t iso9660 path-to-RHEL-DVD.iso /var/www/html/redhat/iso
  6. Copy the boot loader, kernel, and initramfs from the mounted ISO file into your HTML directory:

    # cp -r /var/www/html/redhat/iso/images /var/www/html/redhat
    # cp -r /var/www/html/redhat/iso/EFI /var/www/html/redhat
  7. Make the boot loader configuration editable and ensure the boot files are owned by the user running httpd server (apache):

    # chmod 644 /var/www/html/redhat/EFI/BOOT/grub.cfg
    # chown -R apache:apache /var/www/html/redhat/EFI
  8. Edit the /var/www/html/redhat/EFI/BOOT/grub.cfg file and replace its content with the following:

    set default="1"
    
    function load_video {
      insmod efi_gop
      insmod efi_uga
      insmod video_bochs
      insmod video_cirrus
      insmod all_video
    }
    
    load_video
    set gfxpayload=keep
    
    set timeout=60
    
    menuentry 'Install Red Hat Enterprise Linux 10.0' --class fedora --class gnu-linux --class gnu --class os {
        	linuxefi /redhat/images/pxeboot/vmlinuz inst.repo=http://192.168.124.2/redhat/iso quiet
        	initrdefi /redhat/images/pxeboot/initrd.img
    }
    submenu 'Troubleshooting -->' {
        	menuentry 'Install Red Hat Enterprise Linux 10.0 in text mode' --class fedora --class gnu-linux --class gnu --class os {
                	linuxefi /redhat/images/pxeboot/vmlinuz inst.repo=http://192.168.124.2/redhat/iso inst.text quiet
                	initrdefi /redhat/images/pxeboot/initrd.img
        	}
        	menuentry 'Rescue a Red Hat Enterprise Linux system' --class fedora --class gnu-linux --class gnu --class os {
                	linuxefi /redhat/images/pxeboot/vmlinuz inst.stage2=http://192.168.124.2/redhat/iso inst.rescue quiet
                	initrdefi /redhat/images/pxeboot/initrd.img
        	}
    }

    In this file, update the following strings:

    Install Red Hat Enterprise Linux 10.0
    Edit the version number to match the version of RHEL that you downloaded.
    192.168.124.2
    Replace with the IP address of your server.
  9. Open ports in the firewall to allow HTTP (80), DHCP (67, 68) and DHCPv6 (546, 547) traffic:

    # firewall-cmd --zone public \
                   --add-port={80/tcp,67/udp,68/udp,546/udp,547/udp}

    This command enables temporary access until the next server reboot.

  10. Optional: To enable permanent access, add the --permanent option to the command.
  11. Reload firewall rules:

    # firewall-cmd --reload
  12. Start the HTTP server:

    # systemctl enable --now httpd
  13. Make the html directory and its content readable and executable:

    # chmod -cR u=rwX,g=rX,o=rX /var/www/html
  14. Restore the SELinux context of the html directory:

    # restorecon -FvvR /var/www/html
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る