PXE网络引导安装

PXE安装,配置yum源,搭建dhcp服务

yum源配置及dhcpd服务之前讲过,就不重复,重点讲PXE安装
(1)

yum whatprovides /pxe
PXE网络引导安装

(2)yum install -y syslinux-4.05-12.el7.x86_64
PXE网络引导安装
rpm -ql syslinux.x86_64 ####查看默认发布目录
PXE网络引导安装
(3)yum search tftpPXE网络引导安装
(4)yum install -y tftp-server.x86_64
PXE网络引导安装
rpm -ql tftp-server
PXE网络引导安装
(5) cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
PXE网络引导安装
(7)yum install -y xinetd
PXE网络引导安装
(8—) systemctl start xinetd.service
PXE网络引导安装
(9)vim /etc/xinetd.d/tftp

14 disable = no ##允许开启tftp服务

PXE网络引导安装

(10)systemctl restart xinetd.service
PXE网络引导安装

(11)chkconfig
PXE网络引导安装
(11)vim /etc/dhcp/dhcpd.conf

33 next-server 172.25.254.126;
34 filename “pxelinux.0”;
PXE网络引导安装
(12)systemctl restart dhcpd
systemctl stop firewalld
PXE网络引导安装
(13)cd /var/lib/tftpboot
ls
mkdir pxelinux.cfg
ls

PXE网络引导安装
(13) cd pxelinux.cfg/
ls
pwd
PXE网络引导安装
(14)df(在真机中)
PXE网络引导安装

(15)cd /var/www/html/rhel7.3
ls
cd isolinux/
lsPXE网络引导安装
(16)scp [email protected]:/var/www/html/rhel7.3/isolinux/isolinux.cfg pxelinux.cfg
PXE网络引导安装
(17)ls
PXE网络引导安装
mv isolinux.cfg default
ls
PXE网络引导安装
cd …
pwd
ls
PXE网络引导安装
(18)scp * [email protected]:/var/lib/tftpboot/
(19)ls
/var/lib/tftpboot
ls
ll default
chmod u+w default
vim default
64 append initrd=initrd.img inst.stage2=hd:LABEL=RHEL-7.2\x20Server.x86_64
##删除 quit
PXE网络引导安装
64

append initrd=initrd.img repo=http://172.25.254.66/rhel7.3

更改镜像位置

成功!!!!