- yum install dhcpd xinetd tftp-server syslinux nfs-utils httpd system-config-kickstart
- cat /etc/dhcpd.conf
- ddns-update-style interim;
- ignore client-updates;
- allow bootp;
- allow booting;
- subnet 172.16.148.0 netmask 255.255.255.0 {
- option routers 172.16.148.129;
- option subnet-mask 255.255.255.0;
- next-server 172.16.148.129;
- filename="pxelinux.0";
- option time-offset -18000; # Eastern Standard Time
- range dynamic-bootp 172.16.148.129 172.16.148.140;
- default-lease-time 21600;
- max-lease-time 43200;
- }
设置tftp服务
- chkconfig xinetd on
- chkconfig tftp on
- cp initrd.img vmlinuz /tftpboot/
在tftpboot目录中建立pxelinux.cfg目录
- mkdir /tftpboot/pxelinux.cfg
- [root@centos129 pxelinux.cfg]# cat default
- default local
- prompt 1
- timeout 60
- label local
- localboot
- label install
- kernel vmlinuz
- append initrdinitrd=initrd.img ramdisk_size=8192 ks=http://172.16.148.129/ks.cfg
- cat /etc/exports
- /opt/centos *(rw,root_squash)