yum install
dhcp -y
vim /etc/dhcp/dhcpd.conf
---------------------------------------------
vim /etc/dhcp/dhcpd.conf
---------------------------------------------
allow booting;
allow bootp;
ddns-update-style interim;
ignore client-updates;
subnet 192.168.10.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.10.10;
range dynamic-bootp 192.168.10.100 192.168.10.200;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.10.10;
filename "pxelinux.0";
}
-----------------------------------------------
systemctl restart dhcpd
systemctl enable dhcpd
firewall-cmd --permanent --add-service=dhcp
firewall-cmd --reload
systemctl restart dhcpd
systemctl enable dhcpd
firewall-cmd --permanent --add-service=dhcp
firewall-cmd --reload
yum install
tftp-server -y
vim /etc/xinetd.d/tftp
-------------------------------
-------------------------------
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
-------------------------------------
systemctl restart xinetd
systemctl enable xinetd
firewall-cmd --permanent --add-port=69/udp
firewall-cmd --reload
yum install syslinux -y
cd /var/lib/tftpboot/
cp /usr/share/syslinux/pxelinux.0 .
cp /media/cdrom/images/pxeboot/{vmlinuz,initrd.img} .
cp /media/cdrom/isolinux/{vesamenu.c32,boot.msg} .
mkdir pxelinux.cfg
cp /media/cdrom/isolinux/isolinux.cfg pxelinux.cfg/default
vim pxelinux.cfg/default
------------------------
第一行改为:default linux
第64行改为:append initrd=initrd.img inst.stage2= ftp://192.168.10.10 ks= ftp://192.168.10.10/pub/ks.cfg quiet
第70行改为:append initrd=initrd.img inst.stage2= ftp://192.168.10.10 rd.live.check ks= ftp://192.168.10.10/pub/ks.cfg quiet
yum install vsftpd -y
systemctl restart vsftpd
systemctl enable vsftpd
firewall-cmd --permanent --add-service=ftp
firewall-cmd --reload
cp -r /media/cdrom/* /var/ftp
setsebool -P ftpd_connect_all_unreserved=on
cp ~/anaconda-ks.cfg /var/ftp/pub/ks.cfg
chmod +r /var/ftp/pub/ks.cfg
vim /var/ftp/pub/ks.cfg
-------------------------------
第6行cdrom改为:url --url= ftp://192.168.10.10
第21行时区改为:timezone Asia/Shanghai --isUtc
第28行改为:clearpart --all --initlabel
firewall-cmd --permanent --add-port=69/udp
firewall-cmd --reload
yum install syslinux -y
cd /var/lib/tftpboot/
cp /usr/share/syslinux/pxelinux.0 .
cp /media/cdrom/images/pxeboot/{vmlinuz,initrd.img} .
cp /media/cdrom/isolinux/{vesamenu.c32,boot.msg} .
mkdir pxelinux.cfg
cp /media/cdrom/isolinux/isolinux.cfg pxelinux.cfg/default
vim pxelinux.cfg/default
------------------------
第一行改为:default linux
第64行改为:append initrd=initrd.img inst.stage2= ftp://192.168.10.10 ks= ftp://192.168.10.10/pub/ks.cfg quiet
第70行改为:append initrd=initrd.img inst.stage2= ftp://192.168.10.10 rd.live.check ks= ftp://192.168.10.10/pub/ks.cfg quiet
yum install vsftpd -y
systemctl restart vsftpd
systemctl enable vsftpd
firewall-cmd --permanent --add-service=ftp
firewall-cmd --reload
cp -r /media/cdrom/* /var/ftp
setsebool -P ftpd_connect_all_unreserved=on
cp ~/anaconda-ks.cfg /var/ftp/pub/ks.cfg
chmod +r /var/ftp/pub/ks.cfg
vim /var/ftp/pub/ks.cfg
-------------------------------
第6行cdrom改为:url --url= ftp://192.168.10.10
第21行时区改为:timezone Asia/Shanghai --isUtc
第28行改为:clearpart --all --initlabel