1. Install a miniume system.
2. NFS is installed by default. We just need to export the installation media tree by NFS. Modify the file of /etc/export and add a line /folder-to-export *(ro) to the file and save&exit. in this case, i exported the /rh6repo folder which contains the rhel6 installation media tree. run the command /etc/init.d/nfs start to start nfs service and export the folder which you would share.
3. install tftp-server, dhcp, syslinux services. You can use the yum install to solve the package dependency problem. if you don’t have an available RHN account, you may need to spend some time to create a local YUM repository. (See my another document of create a local YUM repository)
4. Configure the tftp server.

  • enable the tftp service by modify the configuration /etc/xinet.d/tftp
    modify it and change the disable=yes to no.
  • /etc/init.d/xinetd restart
  • tftp root folder is under the /var/lib/tftpboot/.
  • copy /usr/share/syslinux/pxelinux.0 to /var/lib/tftpboot.
  • copy the boot.msg, splash.jpg, vesamenu.c32 from DVDInstallationMedia/isolinux/ to /var/lib/tftpboot/
  • make a folder /var/lib/tftpboot/rh6_64/to which the linux kernal copy.
  • copy the linux kernel file, initrd.img and vmlinuz to this folder.
  • make a directory named as pxelinux.cfg
  • copy the file of isolinux.cfg from the Installation DVD media/isolinux/ to /var/lib/tftpboot/pxelinux.cfg/ and rename to default
  • modify the default file and change the initrd.img and vmlinuz related path. Point these related path to rh6_64/ which we created and contains the linux kernel.

5. Configure the DHPC server.

  • setup the dhcp server could be started at level 345
    #chkconfig –level 345 dhcpd on
  • modify the dhcp configuration file. /etc/dhcp/dhcpd.conf

========configureation content========
allow booting;
allow bootp;

option domain-name “linuxlab.lan”;
option domain-name-servers 127.0.0.1
log-facility local7;
default-lease-time 600;
max-lease-time 7200;

subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.50 192.168.10.100;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.10.255;
filename “/pxelinux.0”;
next-server 192.168.10.20;

}

  • /etc/init.d/dhcpd start

6. add the firewall rules to allow the tftp and nfs  packet pass through. the tcp/upd port number you can find them in /etc/services. Certiainly you also can disable the iptables for sure.
7. boot the client server and PXE server could be booted up by pxe and installing.