具体配置
服务器端安装软件包
- yum install dhcpd xinetd tftp-server syslinux nfs-utils httpd system-config-kickstart
服务器端配置dhcp服务
- 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
将网络安装所需要的启动和映像文件copy到/tftpboot
- cp initrd.img vmlinuz /tftpboot/
在tftpboot目录中建立pxelinux.cfg目录
- mkdir /tftpboot/pxelinux.cfg
在pxelinux.cfg目录中建立pxe配置文件default
- [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
配置NFS提供安装内容目录的服务
将光盘安装文件目录复制到/opt/centos下
配置nfs服务
- cat /etc/exports
- /opt/centos *(rw,root_squash)
利用system-config-kickstart生成ks.cfg文件,将ks.cfg文件cp到httpd的跟目录下
启动服务
nfs xinetd httpd tftp
客户端设置
确保网卡支持pxe启动方式
转载于:https://blog.51cto.com/fghjk/771161