设置装备摆设体例网上其实其实是良多,如不美观要更具体的,巨匠可以直接到网上找,我不会在这里写的很是具体,不会step by step的讲述,最主要的是要知道实现事理!相信看了我下面的事理讲解,能对你们看相关文档带来更大的辅佐,因为真的有良多人在对着文档做的时辰更本不知道自己在做什么!
2 x" z, K1 B4 M 流程化实现事理:
+ P! c8 M4 M5 ] 撑持PXE的电脑开机(预先打开网卡PXE功能,收集指导)---> DHCP给该电脑一个IP地址,并指明下一跳tftp文件处事器 ---> 电脑去tftp处事器上(/tftpboot 文件夹下面)下载到一个叫做 pxelinux.0的文件,并拿到pxelinux.cfg文件夹下的default设置装备摆设文件 ---> 按照该设置装备摆设文件加载内核等操作,同时该设置装备摆设文件中可以指明ks.cfg文件的地址,这样实现全程无人化安装!% D( p9 Y( g. A% m0 ^7 T
根基实现轨范:
" S$ Y; Y s X 1.DHCP处事器设置装备摆设
6 `3 y1 X) g6 m" a+ g3 B; o # cat /etc/dhcpd.conf9 `0 t4 ~) o/ c3 ?: z# A; u
ddns-update-style interim;
2 @9 K0 E; R. L8 d ignore client-updates;
) w' B! W6 L$ i' B allow booting;9 k* F, I. B0 y$ y- d; t
allow bootp;
5 |# J% H0 W7 Z. H subnet 192.168.1.0 netmask 255.255.255.0 {, L# p$ | z. h8 D* P
# --- default gateway* B2 w6 ^! K! q, T! T
option routers 192.168.1.1;
* y: r* A* c) X1 `: t2 X( R option subnet-mask 255.255.255.0;
. V- {7 r2 w$ \+ j1 A$ S9 ] # option nis-domain "domain.org";+ @: u: i" J: ?- c# t; ^; l) s! ~' F
# option domain-name "domain.org";* R" Q$ E- l7 J' B
option domain-name-servers 192.168.1.1;
5 ]& u: Y. m$ ?2 ] option time-offset -18000; # Eastern Standard Time- U; e# I- J! }* U9 t
# option ntp-servers 192.168.1.1;
, s8 L' S+ a- W5 i0 ^, ?1 t, A. z # option netbios-name-servers 192.168.1.1;3 W0 j: e4 u, ~6 ?" w- ~: t
# --- Selects point-to-point node (default is hybrid). Don't change this unless4 t) V( J$ g+ i6 Z6 J
# -- you understand Netbios very well
3 d- {: J; k# L: x # option netbios-node-type 2; t+ E: ?0 P6 H3 e3 J# _. v
range dynamic-bootp 192.168.1.2 192.168.1.10;
9 ~' A$ E C0 d v/ ^5 L6 _7 v5 s default-lease-time 21600;
8 a! J& o1 |* C8 t1 i max-lease-time 43200;
9 L- z) V$ Q9 Y next-server 192.168.1.112;5 K) P: J7 X5 N, e# \: |7 [
filename "pxelinux.0";
6 s- s. r0 u+ L+ J: _ # we want the nameserver to appear at a fixed address
: ?; k; ]( Y' ?. w, P # host ns {
3 v$ F( I* |9 o8 C8 h4 O7 R+ k # next-server marvin.redhat.com;
. j' e4 e* Z3 ^ # hardware ethernet 12:34:56:78:AB:CD;
. H$ S. m7 [( Q- N: c # fixed-address 207.175.42.254;2 z. ^! m- H+ b
# }
! w: K' I6 A0 f } |