当前位置:网站首页>PXE network installation
PXE network installation
2022-07-28 15:40:00 【A cat that can't modulate and demodulate】
Catalog
Install enable DHCP And configure the file
Boot file vmlinuz and initrd.img
Configure the Startup menu file
Environmental preparation
Install enable DHCP And configure the file
Check for installation dhcp, If it doesn't, it's directly yum install
yum install -y dhcp
Copy
cp -rfp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
Modify the configuration file
vim /etc/dhcp/dhcpd.conf
subnet 192.168.150.0 netmask 255.255.255.0 { # To configure IP And subnet mask
range 192.168.150.100 192.168.150.200; # Configure address pool
option domain-name-servers 114.114.114.114; # Configure domain name resolution
option routers 192.168.150.1; # configure gateway
next-server 192.168.150.1;
filename "pxelinux.0" # Configure boot file
}

Configure network card
After configuration, add a new network card

At this point we ifconfig Check the , You will find an additional network card

Then we make a copy ens33 To ens37 Inside , And enter ens37 Set in the network card

To configure TFTP
yum -y install tftp-server
yum -y install xinetd
vim /etc/xinetd.d/tftpservice tftp
{
socket_type = dgram
protocol = udp
wait = yes
//wait no Indicates that multiple clients can be connected together ,yes Indicates that the client can only be connected to one by one , Indicates whether to enable multithreading to work together , Otherwise you need to wait
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
// Appoint TFTP root directory ( The storage path of the boot file ) -c Allow upload
disable = no // modify disable no Open for indication TFTP service
per_source = 11
// By limiting the maximum number of connections to a host , So as to prevent a host from monopolizing a service , Every one here IP The number of connections to the address is 11 individual
cps = 100 2
// Indicates that the server can start up at most 100 A connection , If this number is reached, new services will stop starting 2 second . No requests will be accepted during this period
flags = IPv4
}systemctl enable tftp
systemctl start tftpBoot file vmlinuz and initrd.img
mount /dev/cdrom /mnt
cp /mnt/images/pxeboot/initrd.img vmlinuz /var/lib/tftpboot/ systemctl start xinetd
systemctl enable xinetd
systemctl start tftp
systemctl enable tftp Boot file pxelinux.0
pxelinux.0 It's a binary , The main function is equivalent to the guidance of a system installation step , Guide the client how to install the system
yum provides */pxelinux.0 Find its location and copy it to /var/lib/tftpbooot/
rpm -ql syslinux | grep pxelinux.0
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ Configure the Startup menu file
Because the pxelinux.0 This document decides to /var/lib/tftpboot/pxelinux.cfg/default file , So all we have to do is /var/lib/tftpboot/ Manually create
mkdir /var/lib/tftpboot/pxelinux.cfg
vim /var/lib/tftpboot/pxelinux.cfg/default default auto // Specify the default entry name , Corresponding to the following label auto
prompt 1
// Set whether to wait for the user to choose ,1 Wait for user control ,0 Indicates that you do not wait for user control , During installation, there will be boot: If you press enter
Express choice auto Pattern
label auto // Default graphics installation
kernel vmlinuz
append initrd=initrd.img method=ftp://192.168.150.30/centos7
//method You must specify a network path
label linux text // Text installation mode , appear boot: Time input linux text
kernel vmlinuz
append text initrd=initrd.img method=ftp://192.168.150.30/centos7
label linux rescue // Rescue mode , appear boot: Time input linux rescue
kernel vmlinuz
append rescue initrd=initrd.img method=ftp://192.168.150.30/centos7 kickstart
install system-config-kickstart
yum install -y system-config-kickstart
open Kickstart Configurator window








Save to /var/ftp/ Next , file name ks.cfg
It can be done to ks To optimize
vi /var/lib/tftpboot/pxelinux.cfg/default
default auto
prompt 1
label auto
kernel vmlinuz
append initrd=initrd.img method=ftp://192.168.150.30/centos7 ks=ftp://192.168.100.100/ks.cfg
label linux text
kernel vmlinuz
append text initrd=initrd.img method=ftp://192.168.150.30/centos7 ks=ftp://192.168.100.100/ks.cfg
label linux rescue
kernel vmlinuz
append rescue initrd=initrd.img method=ftp://192.168.150.30/centos7 ks=ftp://192.168.100.100/ks.cfg边栏推荐
猜你喜欢

Getting started with crawlers (1) -- requests (1)

语音社交系统——完善有声系统产业链

Grpc protocol buffer

About the pictures inserted in the word document, only the following part is displayed

How to obtain and embed go binary execution package information

Editor in ArcGIS Pro

NFTScan 与 NFTPlay 在 NFT 数据领域达成战略合作

生命的感悟

Explain the difference set, intersection set and union set of complex type set in detail.Net

一篇文章了解RSocket协议
随机推荐
4.8 hd-gr GNSS navigation software source code
如何通过adb打开和关闭飞行模式
根据输入target,返回数组的两个下标。
20. Channel allocation task implementation
4、主程序和累积中断处理例程实现代码
800V高压系统
关于word文档中插入的图片只显示下面一部分
Grpc protocol buffer
语音社交系统——完善有声系统产业链
Opencv - draw mask images of multiple instances
Summary and arrangement of postgraduate entrance examination information of 211 colleges and universities nationwide
Stateflow logic system modeling
How to write a JMeter script common to the test team
堆操作
Common methods of qcustomplot drawing tools
9. Related data accumulation task definition
Editor in ArcGIS Pro
Stateflow逻辑系统建模
3. Basic constants and macro definitions
软件架构与设计(二)-----架构模型