In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. PXE network installation
1. Overview: PXE is a network bootstrap technology developed by intel, and Candlestick architecture.
two。 Conditions:
Server side:
The dhcp service provides network parameters for the client and specifies the pxe server address. The tftp-server service sends vmlinuz kernel, initrd.img startup files, pxelinux related files for the client. Vsftpd services provide software in the ISO image of the system installation process and ks.cfg (answer file) kickstart services generate ks.cfg response files (covering every step of the installation system)
Client: the network card supports PXE protocol, and the motherboard supports network boot
3. The relationship between the three components
4. Installation process:
A. Set the BIOS of the client to start from PXE
B. The client requests the DHCP server to obtain the dynamic IP from the network
C. DHCP server issues IP, boot file location, TFTP server address
D. The client requests the TFTP server to get the boot file
E. Execute the bootstrap
F. Request TFTP server to get configuration file (pxelinux.cfg)
G. The configuration file contains the location information of vmlinux, initrd.img and ks files.
According to the configuration file, the user requests the TFTP server to obtain the linux kernel (vmlinux)
I. Request TFTP server to obtain linux root file system (initrd.img)
J. Client starts the linux kernel
K, the kernel mounts initrd.img and executes to mount various modules
L. If you set the KS file, the installation steps are selected automatically, otherwise you need to select them manually.
M, complete the installation
two。 Experimental process
(I) install dhcp service and configure / etc/dhcp/dhcpd.conf
[root@localhost network-scripts] # yum install dhcp- y install the dhcp service [root@localhost network-scripts] # cp/ usr/share/doc/dhcp-4.2.5/dhcpd.conf.example / etc/dhcp/dhcpd.conf copied to the configuration file cp of dhcp: do you want to overwrite "/ etc/dhcp/dhcpd.conf"? Y [root@localhost network-scripts] # vim / etc/dhcp/dhcpd.conf Edit dhcp configuration file subnet 192.168.100.0 netmask 255.255.255.0 {range 192.168.100.20 192.168.100.340; option routers 192.168.100.100; option domain-name-servers 114.114.114; next-server 192.168.100.100 next-server / point to tftp server address filename "pxelinux.0" Specify boot file}
(2) install syslinux,tftp service
1 install tftp and modify the configuration file
[root@localhost network-scripts] # yum install tftp-server-y / / install the tftp service [root@localhost network-scripts] # sed-I'/ disable/s/yes/no/g' / etc/xinetd.d/tftp / / modify the configuration file
two。 Install syslinux and copy the boot file pxelinux.0 to the / var/lib/tftpboot directory
Oot@localhost network-scripts] # yum install syslinux-y / / install syslinux [root @ localhost network-scripts] # find / usr/share/syslinux/-name "pxelinux.0"-exec cp-fp {} / var/lib/tftpboot\; / / copy the pxelinux.0 file to the / var/lib/tftpboot directory
(3) install the vsftp service (connect the centos7 image file to the CD before installation) and copy the compressed kernel and initialization files to the TFTP site
[root@localhost tftpboot] # yum install vsftpd-y / / install the vsftp service mkdir / var/ftp/centos7/ / create the centos7 directory mount / dev/sr0 / var/ftp/centos7/ / mount the image to the centos7 find / var/ftp/centos7/images/pxeboot-name "initrd.img"-exec cp-fp {} / var/lib/tftpboot\ Find / var/ftp/centos7/images/pxeboot-name "vmlinuz"-exec cp-fp {} / var/lib/tftpboot\
(4) Edit the startup menu default configuration file, turn off the firewall and enable the three services
[root@localhost pxeboot] # cd / var/lib/tftpboot/ switch to tftp site [root@localhost tftpboot] # mkdir pxelinux.cfg create profile directory [root@localhost tftpboot] # lsinitrd.img pxelinux.0 pxelinux.cfg vmlinuz [root@localhost tftpboot] # cd pxelinux.cfg/ [root@localhost pxelinux.cfg] # vim default Edit default configuration file [root@localhost pxelinux.cfg] # systemctl stop firewalld.service turn off firewall [root@localhost pxelinux.cfg] # Setenforce 0 [root@localhost pxelinux.cfg] # systemctl start dhcpd starts three services [root@localhost pxelinux.cfg] # systemctl start tftp [root@localhost pxelinux.cfg] # systemctl start vsftpd
The defualt configuration file is as follows
Default autoprompt 1label auto kernel vmlinuz append initrd=initrd.img method= ftp://192.168.100.100/centos7label linux text kernel vmlinuz append text initrd=initrd.img method= ftp://192.168.100.100/centos7label linux rescue kernel vmlinuz append rescue initrd=initrd.img method= ftp://192.168.100.100/centos7
three。 Script
#! / bin/bash#--#by jiji date:9-10-# pxe efficient installation-#-- # configure dhcp profile dhcpexp () {echo-e "subnet 192.168.100.0 netmask 255 .255.255.0 {range 192.168.100.10 192.168.100.20 Option routers 192.168.100.100; option domain-name-servers 114.114.114.114; next-server 192.168.100.100; filename\ "pxelinux.0\";} "> / etc/dhcp/dhcpd.conf} # install dhcprpm-Q dhcpif [$?-eq 0] Then dhcpexpelse yum-y install dhcp cp-fpr / usr/share/doc/dhcp*/dhcpd.conf.example / etc/dhcp/dhcpd.conf dhcpexpfi# install tftp and modify the configuration file rpm-Q tftp-serverif [$?-ne 0] Then yum-y install tftp-server sed-I'/ disable/s/yes/no/g' / etc/xinetd.d/tftpelse sed-I'/ disable/s/yes/no/g' / etc/xinetd.d/tftpfi# install syslinuxrpm-Q syslinuxif [$?-ne 0]; then find / usr/share/syslinux/-name "pxelinux.0"-exec cp-fp {} / var/lib/tftpboot\ Else yum-y install syslinux find / usr/share/syslinux/-name "pxelinux.0"-exec cp-fp {} / var/lib/tftpboot\; fi$ install ftprpm-Q vsftpdif [$?-ne 0] Then yum-y install vsftpd mkdir / var/ftp/centos7 mount / dev/sr0 / var/ftp/centos7 find / var/ftp/centos7/images/pxeboot-name "initrd.img"-exec cp-fp {} / var/lib/tftpboot\; find / var/ftp/centos7/images/pxeboot-name "vmlinuz"-exec cp-fp {} / var/lib/tftpboot\ Else mkdir / var/ftp/centos7 mount / dev/sr0 / var/ftp/centos7 find / var/ftp/centos7/images/pxeboot-name "initrd.img"-exec cp-fp {} / var/lib/tftpboot\; find / var/ftp/centos7/images/pxeboot-name "vmlinuz"-exec cp-fp {} / var/lib/tftpboot\ Fi# configuration Edit default Startup menu mkdir / var/lib/tftpboot/pxelinux.cfgcat > / var/lib/tftpboot/pxelinux.cfg/default
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.