1. Demand The base has 300 new servers, and needs to install the CentOS7.6 operating system by itself. Choose to use PXE for batch installation. 2. Preparation Use a Layer 2 switch to connect servers that do not have an operating system installed to avoid affecting normal servers on the existing network. Upload the operating system image to the server and install the necessary services for the PXE environment. Mount the image file as a local software repository. Environment Preparation systemctl stop firewalld # Turn off the firewall setenforce 0 # Temporarily set SELINUX to loose mode sed -i '/^SELINUX=/s/.*/SELINUX=disabled/' /etc/selinux/config # Permanently disable SELINUX (requires reboot to take effect) mkdir -p /var/www/html/CentOS1810/ mount /tmp/CentOS-7-x86_64-DVD-1810.iso /var/www/html/CentOS1810 mkdir /etc/yum.repos.d/backup mv /etc/yum.repos.d/{*,backup} # ignore the error message cat >/etc/yum.repos.d/local.repo<<EOF [local_repo] name=local_repo baseurl=file:///var/www/html/CentOS1810 gpgcheck=0 EOF yum clean all && yum makecache yum install httpd dhcp xinetd tftp-server syslinux -y 3. Service Configuration Configure DHCP service Modify the dhcp server configuration file mv /etc/dhcp/dhcpd.conf{,.bak} # Back up the default configuration file cat>/etc/dhcp/dhcpd.conf<<EOF subnet 10.0.0.0 netmask 255.255.255.0 { # Define the allocated network segment and mask range 10.0.0.1 10.0.0.252; # Define the allocated address range next-server 10.0.0.253; # Specify the server IP address of the boot file filename "pxelinux.0"; # Specify the boot file name} EOF systemctl start dhcp systemctl enable dhcp ss -nltup |grep :67 Configure tftp-server Edit /etc/xinetd.d/tftp file sed -i '/disable/s/yes/no/' /etc/xinetd.d/tftp systemctl start xinetd systemctl enable xinetd ss -nltup |grep :69 Copy the relevant files to the default home directory of the tftp service mkdir /var/lib/tftpboot/pxelinux.cfg cp -a {/var/www/html/CentOS1810/isolinux/*,/usr/share/syslinux/pxelinux.0} /var/lib/tftpboot/ # Copy the boot menu and boot loader cp -a /var/www/html/CentOS1810/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default Summarize The above is a detailed tutorial on how to automatically install CentOS7.6 using PXE. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Three examples of nodejs methods to obtain form data
Background Recently, I encountered such a problem...
This command modifies the data table ff_vod and a...
Vue uses Ref to get component instances across le...
Let's first understand a wave of concepts, wh...
Beginners can learn HTML by understanding some HT...
Logpoint-based replication 1. Create a dedicated ...
Table of contents mvc mvp mvvm The source of Vue ...
The main configuration file of Nginx is nginx.con...
Table of contents Method 1: The simplest way to s...
After creating a container locally, you can creat...
Table of contents Memory Pool Overview 1. nginx d...
Table of contents 1. Synchronous AJAX 2. Asynchro...
Preface Different script execution methods will r...
Click here to return to the 123WORDPRESS.COM HTML ...
MQTT Protocol MQTT (Message Queuing Telemetry Tra...