PXE 网络化安装linux系统方法介绍 ,配置方法网上实在实在是很多,最重要的是要知道实现原理!相信看了我下面的原理讲解,能对你们看相关文档带来更大的帮助,因为真的有很多人在对着文档做的时候更本不知道自己在做什么!
流程化实现原理:
支持PXE的电脑开机(预先打开网卡PXE功能,网络引导)---> DHCP给该电脑一个IP地址,并指明下一跳tftp文件服务器 ---> 电脑去tftp服务器上(/tftpboot 文件夹下面)下载到一个叫做 pxelinux.0的文件,并拿到pxelinux.cfg文件夹下的default配置文件 ---> 根据该配置文件加载内核等操作,同时该配置文件中可以指明ks.cfg文件的地址,这样实现全程无人化安装!
基本实现步骤:
1.DHCP服务器配置
[root@localhost ~]# cat /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
allow booting;
allow bootp;
subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
# option nis-domain "domain.org";
# option domain-name "domain.org";
option domain-name-servers 192.168.1.1;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.1.2 192.168.1.10;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.1.112;
filename "pxelinux.0";
# we want the nameserver to appear at a fixed address
# host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
# }
}
标签: linux