PXE批量装机

一、dhcp

yum install dhcp -y

vim /etc/dhcp/dhcpd.conf

option domain-name "bw.edu";
option domain-name-servers 192.168.100.10;
default-lease-time 3600;
max-lease-time 7200;
log-facility local7;

subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.110 192.168.100.120;
option routers 192.168.100.1;
option broadcast-address 192.168.100.255;
next-server 192.168.100.10;
filename "pxelinux.0";
}

systemctl start dhcpd
systemctl enable dhcpd

二、tftp

yum install xinetd tftp-server -y

vim /etc/xinetd.d/tftp

disable = no

systemctl start xinetd
systemctl enable xinetd

三、http

yum install httpd -y

cd /var/www/html/

mkdir c75

vim /etc/fstab

/dev/cdrom /var/www/html/c75 iso9660 defaults 0 0

mount -a

systemctl start httpd
systemctl enable httpd

四、pxe

yum install syslinux -y

cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/

cp /var/www/html/c75/isolinux/* /var/lib/tftpboot/

cd /var/lib/tftpboot

mkdir pxelinux.cfg

vim default

default auto
prompt 0
label auto
kernel vmlinuz
append initrd=initrd.img repo=http://192.168.100.10/c75 net.ifnames=0 biosdevname=0

五、kickstar

上一篇:Windows运维之道——PXE备份系统


下一篇:PXE服务器部署