RHEL/cetos7搭建PXElinux服务器

linux 7个月前 散逸
浏览:344 0

1、配置网络 关闭防火墙 关闭selinux
2、配置yum源,安装软件 dhcpd
3、配置dhcp服务
1 systemctl stop firewalld.service
3 setenforce 0
4 getenforce
5 mkdir /dvd
6 mount /dev/sr0 /dvd
7 vim /etc/yum.repos.d/dvd.repo
8 yum listdf
9 yum install dhcp.x86_64 -y
10 systemctl restart dhcpd
11 systemctl enable dhcpd
12 vim /etc/dhcp/dhcpd.conf
13 systemctl restart dhcpd

14 yum install tftp-server.x86_64 -y
15 vim /etc/xinetd.d/tftp yes-no
16 systemctl restart xinetd.service
17 systemctl enable xinetd.service

18 yum install syslinux.x86_64 -y

19 find / -name “pxelinux.0”
24 cd /var/lib/tftpboot/
* 25 cp /dvd/isolinux/* /var/lib/tftpboot/
* 27 cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/

  • 31 mkdir /var/lib/tftpboot/pxelinux.cfg
  • 32 mv /var/lib/tftpboot/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
    34 cd pxelinux.cfg/
    37 chmod 644 default
    38 ll
    39 vim default
    40 systemctl restart xinetd.service
    42 yum install ftp.x86_64 -y
    43 yum install vsftpd.x86_64 -y
    48 yum install system-config-kickstart.noarch -y
    49 system-config-kickstart
    cp ks.cfg /var/ftp/

umount /dvd
mount /dev/cdrom /var/ftp/pub

systemctl restart vsftpd

label linux
menu label ^Install Red Hat Enterprise Linux 7.0 by kickstart
menu default
kernel vmlinuz
append initrd=initrd.img inst.repo=ftp://192.168.1.3/pub inst.ks=ftp://192.168.1.3/ks.cfg

label linux 2
menu label ^Install Red Hat Enterprise Linux 7.0 by vnc
kernel vmlinuz
append initrd=initrd.img inst.repo=ftp://192.168.1.3/pub inst.vnc inst.vncpassword=password


subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.20;

option routers 192.168.1.2;
default-lease-time 600;
max-lease-time 7200;
filename”pxelinux.0″;
next-server 192.168.1.3;
filename “pxelinux.0”;
next-server 192.168.1.100;
}

systemctl restart dhcpd
systemctl enable dhcpd

版权声明:散逸 发表于 2019-12-22 0:27:12。
转载请注明:RHEL/cetos7搭建PXElinux服务器 | 散逸-博客-导航

暂无评论

暂无评论...