Linux PXE and UEFIPXE remote installation system

Source: Internet
Author: User
There are multiple installation methods in Linux: HD, USB, CDROM, PXE, and remote management card. During our system O & M career, operating systems are often installed. However, we only maintain one or two machines, the average number of enterprise servers is dozens, hundreds, thousands, or even UEFIPXE.

There are multiple installation methods in Linux: HD, USB, CDROM, PXE, and remote management card. During our system O & M career, operating systems are often installed. However, we only maintain one or two machines, generally, the number of enterprise servers is dozens, hundreds, thousands, or even tens of thousands. If one of these machines is manually installed, our O & M personnel may spend most of their time installing the system. therefore, we usually create a PXE server to deploy systems in batches through the network.

With the upgrading of computer products and the development of IT enterprises, a company has more and more computer models and hard disks. Therefore, our maintenance methods must keep pace with the times. This paper mainly introduces the hardware environment differences, how to build a multi-purpose PXE server, the following CentOS-6.4-x86_64 version as an example, the server configuration.

1. PXE system deployment for general machines

To automatically obtain the IP address, install linux as follows: enable the PXE Nic on the client-end --> broadcast dhcp requests through the Bootp protocol --> DHCP server --> obtain the IP address, TFTP server address --> Download pxelinux.0 and vmlinuz and initrd from TFTP. img --> start the system --> (go to the specified url to download ks. cfg file --> According to ks. cfg file to the NFS/HTTP/FTP server to automatically download the software package) install the system --> complete the installation.

FTP server is mainly used to publish the installation tree for linux systems (NFS, HTTP, or HTTPS can also be used ), the DHCP server assigns an ip address to the client and provides the TFTP server address and the PXE startup file location. the TFTP server provides the boot file for the client. The three services can be installed on the same server or on the three servers.

1. install and configure the FTP server

 
 
  1. [root@pxe ~]# yum install vsftpd 
  2. [root@pxe ~]# chkconfig vsftpd on 
  3. [root@pxe ~]# service vsftpd start 

The default configuration file of vsftpd is in/etc/vsftpd. conf. the shared directory is under/var/ftp/pub/. you can directly use it without any modifications. After the installation, copy all the system disk images to this directory or mount them to this directory. I just mounted the disk image here because there is a ks. the cfg file is to be sent here, so I have created a mirror directory and mounted the system image to/var/ftp/pub/mirror.

2. install and configure the DHCP server

 
 
  1. [root@pxe ~]# yum install dhcp 

It is important to edit the configuration file.

  1. [Root @ pxe ~] # Vim/etc/dhcp/dhcpd. conf
  2. Default-lease-time 600;
  3. Max-lease-time 7200;
  4. Ddns-update-style none;
  5. Subnet 10.12.190.0 netmask 255.255.255.0 {
  6. Range dynamic-bootp 10.12.190.100 10.12.190.120;
  7. Option routers 10.12.190.254;
  8. Option subnet-mask limit 255.0;
  9. Filename "pxelinux.0"; // if it is not in the TFTP root directory, write the Directory
  10. Next-server 10.12.190.140; // tftp server address
  11. }
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.