#####################PXE########################
#######INSTALL AND CONFIGURE DNSMASQ SERVER########
# dnf install dnsmasq -y
# mv /etc/dnsmasq.conf /etc/dnsmasq.conf.backup
# vim /etc/dnsmasq.conf
insert
interface=ens33
bind-interfaces
domain=example.com
dhcp-range=ens33,192.168.242.160,192.168.242.170,255.255.255.0,8h
dhcp-option=option:router,192.168.242.141
dhcp-option=option:dns-server,192.168.242.141
dhcp-option=option:dns-server,8.8.8.8
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-boot=pxelinux.0,linuxhint-s80,192.168.58.133
pxe-prompt="Press F8 for PXE Network boot.",30
pxe-service=x86PC,"Install OS via PXE",pxelinux
:wq
###############INSTALL SYSLINUX BOOTLOADER###########
# dnf install syslinux -y
# ls /usr/share/syslinux
#####INSTALL TFTP-SERVER AND COPY IT WITH SYSLINUX BOOTLOADER#####
# dnf install tftp-server -y
# cp -r /usr/share/syslinux/* /var/lib/tftpboot
#####SETUP PXE SERVER CONFIGURATION FILE######
# mkdir /var/lib/tftboot/pxelinux.cfg
# touch /var/lib/tftboot/pxelinux.cfg/default
# vim /var/lib/tftboot/pxelinux.cfg/default
Insert
default menu.c32
prompt 0
timeout 300
ONTIMEOUT local
menu title ###### PXE BOOT MENU ######
label 1
menu label ^1) Install RHEL7 with kickstart
kernel rhel7/vmlinuz
append initrd=rhel7/initrd.img ip=dhcp
inst.repo=http://192.168.242.131/{your iso dir name} devfs=nomount
label 2
menu label ^2) boot from local drive
:wq
################CONNECT CD AND MOUNT WITH /MNT##############
# mkdir /var/lib/tftboot/rhel7
# cp /mnt/images/pxeboot/vmlinuz /var/lib/tftboot/rhel7
# cp /mnt/images/pxeboot/initrd.img /var/lib/tftboot/rhel7
#############CONFIGURE HTTP SERVER#############
# dnf install httpd -y
# mkdir /var/www/html/rhel7
# cp -Rv /mnt/* /var/www/html/rhel7
########START AND ENABLE SERVICES#########
# systemctl enable dnsmasq --now
# systemctl enable httpd --now
#
#############add in firewall########
# firewall-cmd --add-service=http --permanent
# firewall-cmd --add-service=dns --permanent
# firewall-cmd --add-service=dhcp --permanent
# firewall-cmd --reload
# firewall-cmd --list-all
##########GO TO CLIENT MACHINE & SELECT NETWORKBOOT######