In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Experimental environment
Two VMware Workstation virtual machines for centos7 are installed, one is a PXE server and the other is bare hardware, which is used to validate PXE services.
Virtual machines with PXE installed need to add a network card.
Add a network card, one for networking using the yum installation package, and one in host-only mode so that it can communicate within the local area network.
Configure the second network card
Enter: cd / etc/sysconfig/network-scripts/ to enter this directory
Cp-p ifcfg-ens33 ifcfg-ens37 / / copy the ens33 Nic configuration file and rename it to ens37
Vim ifcfg-ens37 / / modify the configuration of ens37 network card
Dhcp is static
Two ens33 are ens37
Delete UUID Lin
Enter:
IPADDR=192.168.100.100 / / IP address
NETMASK=255.255.255.0 / / subnet mask
GATEWAY=192.168.100.1 / / Gateway
: wq / / Save exit
Restart the network configuration
Service network restart / / restart network configuration
Ifconfig / / View configuration results
Install and configure the DHCP service
Yum install dhcp-y / / install the dhcp service
Cp/ usr/share/doc/dhcp-4.2.5/dhcpd.conf.example / etc/dhcp/dhcpd.conf / / copy configuration file
Yes / / confirm overwrite
Vim / etc/dhcp/dhcpd.conf / / modify the main configuration file
Configure the following:
Subnet 192.168.100.100 netmask 255.255.255.0 {
Range 192.168.100.20 192.168.100.30; / / address pool
Option routers 192.168.100.100; / / Gateway, point to yourself here
Option domain-name-servers 114.114.114.114; / / assign DNS address
Next-server 192.168.100.100; / / points to the TFTP server
Filename "pxelinux.0"; / / points to the boot file location
}
: wq / / Save and exit
Install bootstrapper files and tftp services
Yum install syslinux-y / / install bootstrapper file
Yum install tftp-server-y / / install the tftpd service
Rpm-ql tftp-server / / View the site path
/ etc/xinetd.d/tftp / / configuration file
/ var/lib/tftpboot / / site
Cp / usr / share/syslinux/pxelinux.0 / var/lib/tftpboot / / put the bootstrap pxelinux.0 into the tftpd site
Ls / / View details
Vim / etc/xinetd.d/tftp / / Edit tftp configuration
Modify disable = no / / enable the service
: wq / / Save exit
Mount the image to the FTP site
Yum install vsftpd-y / / install this service
Rpm-ql vsftpd / / where / var/ftp is the site path
Cd / var/ftp/ enter the site path
Mkdir centos7 / / create a file
Ls / / View the creation result
Mount / dev/sr0 / var/ftp/centos7/ Mount the CD image file to the FTP site
Df-hT / / View the mount status
Cp initrd.img vmlinuz / var/lib/tftpboot/ copy the initialization image file to the tftp service directory
Ls / var/lib/tftpboot/ View replication results
Cd / var/lib/tftpboot/ enter the tftp service directory
Mkdir pxelinux.cfg / / create this file and must be this name
Ls / / View directory details
Cd pxelinux.cfg/ enter the directory
Vim default / / create and edit default file
Edit the following:
Systemctl stop firewalld.service / / turn off the firewall
Setenforce 0 / / turn off security features
Systemctl start dhcpd / / start the DHCP service
Systemctl start tftp / / start the tftp service
Systemctl start vsftpd / / start the vsftpd service
At this point, our PXE service is deployed, and now we can restart the bare metal for PXE deployment and installation.
Restart is eye disease and quickly press Esc, the following interface will appear below, here we choose the fourth one, install the machine from the network.
After that, the following interface will appear, enter directly after the boot appears, and the following steps will be the same as our normal installation.
Kickstart unattended installation machine
Although we use PXE for remote automatic installation, but the subsequent installation settings still need to be operated manually, the next thing we will bring to you is that after entering the startup installation interface, there is no need for manual setup and subsequent installation operation of kickstart unattended technology!
We first need to install the systemc-config- kickstart service before going unattended.
Command: yum install systemc-config- kickstart-y
Configure installation answer parameters
The Kickstart Configurator window can be opened from the desktop menu "applications" → "system tools" → "Kickstart".
1. Basic configuration
The default language is changed to simplified Chinese, the time zone is adjusted to Asia and Shanghai, the root password is set, and restart after installation is checked.
2. Installation method
Select a new installation, and the installation method is FTP,FTP server: ftp://192.168.100.100 ftp directory centos7
3. Zoning information
/ boot 500MB
/ home 4096MB
Swap 4096MB
/ use all unused space on disk
4. Network configuration
Network equipment: ens33
Network type: DHCP
5. Firewall configuration
SELinux: disablin
Security level: disable firewall
6. Post-installation script
Use the interpreter: / bin/bash
Save the file to the / var/ftp directory
Enter the profile by anacomda-ks.cfg.
Copy the following to the end of the ks.cfg file.
Enter the default file to configure the following
Restart after installing a bare metal in the virtual machine (we will not cover the installation process here), but it is important to note that the network type of the installation wizard needs to choose host-only mode.
Press Esc when rebooting, select the fourth one to install from the network
After that, the following interface will pop up and press enter directly.
Now you can install the machine automatically without manual operation.
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.