当前位置:网站首页>PXE installation "recommended collection"
PXE installation "recommended collection"
2022-07-02 19:37:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
Installation environment :
One installed Linux The host of the system acts as PXE Server, In this paper PXE Server The system used is CentOS 7;
Several sets to be installed CentOS7 As PXE Client;
PXE Server With all the PXEClient In the same LAN ;
All hosts support PXE Start the installation mode .
PXEServer Installation and configuration process :
\1. To configure DHCP service
\2. To configure TFTP service
\3. To configure http Do document storage and modification ks.cfg file
\4. Relevant system boot file storage
\5. To configure default System boot file
\6. Check PXEServer And start PXE Client
PXEServer Specific steps of installation and configuration :
1. To configure DHCP service
install DHCP
# yum install -y dhcp
At present PXE Server Of IP The address is 192.168.0.125,DHCP、TFTP And http Are deployed on this host , To configure dhcp The configuration file **/etc/dhcp/dhcpd.conf** as follows
############################
ddns-update-style interim; ignore client-updates; allow booting; allow bootp;
class “pxeclients”{ match if substring(option vendor-class-identifier,0,9)=“PXEClient”; filename “pxelinux.0”; next-server 192.168.0.125; }
subnet 192.168.0.0 netmask 255.255.255.0{ default-lease-time 216000; max-lease-time 432000; option time-offset -18000; range dynamic-bootp 192.168.0.210 192.168.0.240; option subnet-mask 255.255.255.0; option routers 192.168.0.1; }
############################
Start and configure startup dhcpd service
# systemctl start dhcpd
# systemctl enable dhcpd
2. To configure TFTP service
install tftp Of server and client package
# yum install -y tftp*
install xinetd Daemon , because tftp Depend on xinetd
# yum install -y xinetd
modify tftp The configuration file /etc/xinetd.d/tftp, take disable= yes Change it to disable=no
Turn off and configure the system firewall to turn off automatically after startup ( important ! Otherwise, it will lead to PXE Client cannot access TFPT service )
# systemctl stop firewalld
# systemctl disable firewalld
Start and configure automatic startup xinetd process
# systemctl start xinetd
# systemctl enable xinetd
# systemctl start tftp
3. To configure http Do document storage and modification ks.cfg file
install httpd service
# yum install –y httpd
Start and configure startup httpd service
# systemctl start httpd
# systemctl enable httpd
Put the system disk to be installed , And directly use the CD package As an installation warehouse
# mkdir /var/www/html/centos7
# mount /dev/cdrom /var/www/html/centos7/
Put ks File copy to /var/www/html/ Under the path
# cp /root/anaconda-ks.cfg /var/www/html/ks.cfg
modify ks.cfg The configuration file /var/www/html/ks.cfg
ks.cfg The function of is to specify the required installation options in advance ( Including the system image path , Installation of components , System language , The network configuration , User and password ),
When formally installed PXE Client The installation will be automatically configured according to this file , Thus, a large number of repeated operations during large-scale deployment are avoided .
The main modification is that
# Use CDROM installation media
cdrom
It is amended as follows
# Use network installation
url –url=”http://192.168.0.125/centos7″
To specify PXE Client Where to get the image file ,ks.cfg The document is amended as follows :
#version=DEVEL
# System authorization information
auth –enableshadow –passalgo=sha512
# Use network installation
url –url=“http://192.168.0.125/centos7”
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot –enable
# Keyboard layouts
keyboard –vckeymap=cn –xlayouts=‘cn’
# System language
lang zh_CN.UTF-8
# Network information
network –bootproto=dhcp–device=eno16777736 –ipv6=auto –activate
network –hostname=localhost.localdomain
# Root password
rootpw –iscrypted 6 6 6qUeqvWWOr921mWBY$h5wjwdcnIOC/FS6rCaZblKNGELwN9jrGwJZuwlrNi9OHzI.n1lxaKKrkwdN7nadXP5f2mFRDrW9D9gYStXGZu/
# System timezone
timezone Asia/Shanghai –isUtc
user –groups=wheel –name=pxetest–password= 6 6 6.hgpJdCAhSMaf7yB$5GKYIAgTkLxfS1JHK5KSpN96LXhkKGFX3FbnQl0hTME3wbF1njxyezmPF/HXAtI9Bp8U6MsF3hRXlFvFfn9Nm/–iscrypted –gecos=“pxetest”
# System bootloader configuration
bootloader –append=” crashkernel=auto”–location=mbr –boot-drive=sda
autopart –type=lvm
# Partition clearing information
clearpart –none –initlabel
%packages
@^infrastructure-server-environment
@base
@compat-libraries
@core
@debugging
@development
@dns-server
@file-server
@ftp-server
@security-tools
@smart-card
kexec-tools
%end
%addon com_redhat_kdump –enable–reserve-mb=‘auto’
%end
4. Relevant system boot file storage
install syslinux, It is a powerful boot loader , And compatible with a variety of media .
# yum install -y syslinux
pxelinux.0 File name and dhcp Consistency in the configuration file
# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
copy In the CD directory vmlinuz and initrd.img, These two files are equivalent to when the system starts /boot Boot file in directory , This is used to guide anacoda Not the root
# cp /mnt/cdrom/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/
copy pxe Configuration files required for boot ,splash.png: Background map .boot.msg Launch slogan ,vesamenu.c32: Program for displaying peer interface .
# cp /mnt/cdrom/isolinux/{boot.msg,vesamenu.c32,splash.png} /var/lib/tftpboot/
pxe Display profile information at startup , Similar to CD-ROM startup .
# mkdir /var/lib/tftpboot/pxelinux.cfg
# cp /mnt/cdrom/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
5. To configure default System boot file
stay default The configuration file /var/lib/tftpboot/pxelinux.cfg/default Find the following label in
label linux
menu label^Install CentOS 7
kernel vmlinuz
menu default
append initrd=initrd.img inst.stage2=http://192.168.0.125/centos7 inst.ks=http://192.168.0.125/ks.cfg quiet
Pay attention to the red mark , Its purpose is to tell PXEClient Where can I find the image file and ks.cfg The configuration file .
6. Check PXE Server And start PXE Client
# service dhcpd status
# service tftp status
# service httpd status
The result of the above three should be active(running)
# service firewalld status
The result should be inactive(dead)
Check whether the system disk to be installed is attached to the specified directory (/var/www/html/centos7/)
If the above states are normal , You can start PXEClient, And set the startup mode to network card startup .
common problem :
1、 PXE Server After every startup IP The addresses are different ?
answer : It should be said that PXE Server Set to static IP, Otherwise, every restart needs to be based on the new IP Modify the configuration file
2、 PXE Server After restart Client End display cannot be connected TFTP The server ?
answer :PXE Server It needs to be reopened after each restart tftp service
#service tftp start
3、 PXE Server After restart Client The end display cannot access the specified file ?
answer :PXE Server You need to restart after each restart mount CD to the specified path
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/148567.html Link to the original text :https://javaforall.cn
边栏推荐
- IDEA编辑器去掉sql语句背景颜色SQL语句警告No data sources are configured to run this SQL...和SQL Dialect is Not Config
- AcWing 341. 最优贸易 题解 (最短路、dp)
- Web2.0 giants have deployed VC, and tiger Dao VC may become a shortcut to Web3
- metric_ Logger urination
- Registration opportunity of autowiredannotationbeanpostprocessor under annotation development mode
- VBScript详解(一)
- Which video recording software is better for the computer
- pxe装机「建议收藏」
- 数据湖(十二):Spark3.1.2与Iceberg0.12.1整合
- MySQL table historical data cleaning summary
猜你喜欢
随机推荐
Istio1.12:安装和快速入门
机器学习笔记 - 时间序列预测研究:法国香槟的月销量
数据湖(十二):Spark3.1.2与Iceberg0.12.1整合
SIFT特征点提取「建议收藏」
IEDA refactor的用法
Digital scroll strip animation
NMF-matlab
Detailed tutorial on installing stand-alone redis
AcWing 383. 观光 题解(最短路)
多端小程序开发有什么好处?覆盖百度小程序抖音小程序微信小程序开发,抢占多平台流量红利
使用IDM下载百度网盘的文件(亲测有用)[通俗易懂]
Use cheat engine to modify money, life and stars in Kingdom rush
中缀表达式转换为后缀表达式(C语言代码+详解)
Function high order curry realization
Windows2008R2 安装 PHP7.4.30 必须 LocalSystem 启动应用程序池 不然500错误 FastCGI 进程意外退出
451 implementation of memcpy, memmove and memset
AcWing 1135. 新年好 题解(最短路+搜索)
mysql备份后缀是什么_mysql备份还原
Typescript 之 快速入门
451-memcpy、memmove、memset的实现