Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

26

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

ip addr show
mount /dev/sr0 /mnt ; cp -r /mnt/* /var/frp/pub
cd /etc/yum.repos.d/
ls
vim local.repo
vi local.repo
yum repolist
setenforce 0 ; systemctl disbale firewalld ; systemctl stop firewalld
vim /etc/selinux/config "disabled mode"
vi /etc/selinux/config
sestatus
yum -y install dhcp tftp tftp-server syslinux wget
yum -y install vsftpd
vi /etc/dhcp/dhcpd.conf
yum install vim
vi /etc/dhcp/dhcpd.conf
vim /etc/dhcp/dhcpd.conf

ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;
allow-unknown-clients;
subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.50 192.168.100.60;
option domain-name-servers 192.168.100.2;
option routers 192.168.100.2;
default-lease-time 600;
max-lease-time 7200;
#pxe-server ip
next-server 192.168.100.10;
filename "pxelinux.0";
}
43 vim /etc/xinetd.d/tftp
44 mkdir -p /tftpboot
45 chmod 777 /tftpboot/
46 cp -v /usr/share/syslinux/pxelinux.0 /tftpboot/
47 cp -v /usr/share/syslinux/menu.c32 /tftpboot/
48 cp -v /usr/share/syslinux/memdisk /tftpboot/
49 cp -v /usr/share/syslinux/mboot.c32 /tftpboot/
50 cp -v /usr/share/syslinux/chain.c32 /tftpboot/
51 mkdir /tftpboot/pxelinux.cfg
52 mkdir -p /tftpboot/netboot
53 cp -r /mnt/* /var/ftp/pub/
54 vim /tftpboot/pxelinux.cfg/default
default menu.c32
prompt 0
timeout 300

MENU TITLE MyREDHAT PXE Menu


LABEL REDHAT7_X86
MENU LABEL REDHAT 7 X64
KERNEL netboot/vmlinuz
APPEND initrd=netboot/initrd.img inst-repo=ftp://192.168.100.10/pub
ks=ftp://192.168.100.10/pub/ks.cfg
55 systemctl restart dhcpd
56 systemctl restart xinetd
57 systemctl restart vsftpd

You might also like