Professional Documents
Culture Documents
com/install-pxe-server-centos-7/
A PXE server allows your client computers to boot and install a Linux distribution over the
network, without the need of burning Linux iso images, or human interaction.
DHCP Server
TFTP Server
NFS/FTP/HTTPD server (to store installing files)
Note:
1 of 8 7/8/2018, 9:31 PM
Install PXE Server On CentOS 7 | Unixmen https://www.unixmen.com/install-pxe-server-centos-7/
vim /etc/dhcp/dhcpd.conf
# PXE SERVER IP
next-server 192.168.0.199; # DHCP server ip
filename "pxelinux.0";
}
3. Configure TFTP Server. Set disable from yes to no, and change the root directory on
startup to /tftpboot
vim /etc/xinetd.d/tftp
2 of 8 7/8/2018, 9:31 PM
Install PXE Server On CentOS 7 | Unixmen https://www.unixmen.com/install-pxe-server-centos-7/
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
mkdir -p /tftpboot
chmod 777 /tftpboot
cp -v /usr/share/syslinux/pxelinux.0 /tftpboot
cp -v /usr/share/syslinux/menu.c32 /tftpboot
cp -v /usr/share/syslinux/memdisk /tftpboot
cp -v /usr/share/syslinux/mboot.c32 /tftpboot
cp -v /usr/share/syslinux/chain.c32 /tftpboot
mkdir /tftpboot/pxelinux.cfg
mkdir -p /tftpboot/netboot/
cp /var/ftp/pub/images/pxeboot/vmlinuz /tftpboot/netboot/
3 of 8 7/8/2018, 9:31 PM
Install PXE Server On CentOS 7 | Unixmen https://www.unixmen.com/install-pxe-server-centos-7/
cp /var/ftp/pub/images/pxeboot/initrd.img /tftpboot/netboot/
Example: 000000
8. Create a new kickstart file (you can change it for your needs)
vim /var/ftp/pub/ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use NFS installation media
url --url="ftp://192.168.0.199/pub/"
# Root password [i used here 000000]
rootpw --iscrypted $1$xYUugTf4$4aDhjs0XfqZ3xUqAg7fH3.
# System authorization information
auth useshadow passalgo=sha512
# Use graphical install
graphical
firstboot disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux disabled
# Installation logging level
logging level=info
4 of 8 7/8/2018, 9:31 PM
Install PXE Server On CentOS 7 | Unixmen https://www.unixmen.com/install-pxe-server-centos-7/
# System timezone
timezone Europe/Amsterdam
# System bootloader configuration
bootloader location=mbr
clearpart --all --initlabel
part swap --asprimary --fstype="swap" --size=1024
part /boot --fstype xfs --size=200
part pv.01 --size=1 --grow
volgroup rootvg01 pv.01
logvol / --fstype xfs --name=lv01 --vgname=rootvg01 --size=1 --grow
%packages
@core
wget
net-tools
%end
%post
%end
vim /tftpboot/pxelinux.cfg/default
default menu.c32
prompt 0
timeout 30
MENU TITLE unixme.com PXE Menu
LABEL centos7_x64
MENU LABEL CentOS 7 X64
KERNEL /netboot/vmlinuz
APPEND initrd=/netboot/initrd.img inst.repo=ftp://192.168.0.199/pub
ks=ftp://192.168.0.199/pub/ks.cfg
5 of 8 7/8/2018, 9:31 PM
Install PXE Server On CentOS 7 | Unixmen https://www.unixmen.com/install-pxe-server-centos-7/
chkconfig dhcpd on
chkconfig xinetd on
chkconfig vsftpd on
12. Now create new virtual machine and start from network and enjoy.
6 of 8 7/8/2018, 9:31 PM
Install PXE Server On CentOS 7 | Unixmen https://www.unixmen.com/install-pxe-server-centos-7/
Enjoy.
https://www.unixmen.com
7 of 8 7/8/2018, 9:31 PM
Install PXE Server On CentOS 7 | Unixmen https://www.unixmen.com/install-pxe-server-centos-7/
8 of 8 7/8/2018, 9:31 PM