Network-based RedHat system unattended installation

  
 

Building a REDHAT Network Installation Server

This article describes a fast Red Hat Linux installation on the PC platform. He has a very high degree of automation - users only need to manually start the machine and choose to boot from the network to complete the entire installation process. This solution saves a lot of time when you need to install a large number of Red Hat Linux systems in batches and require technical staff Red Hat Linux installation support. And because there is no need for additional software and hardware devices such as optical drives and floppy drives, there is also a huge advantage in cost. All R&D/testers who install Red Hat Linux, and IT support staff can benefit from this article. Readers need to have Red Hat Linux installation experience before reading this article. 1. Introduction In general, to install Linux, you need to boot the machine from the CD-ROM installation CD, and then enter the interactive installation interface to enter the various settings required for installation to complete the installation. In the following cases, this installation method will expose the disadvantages: 1) The machine has no optical drive, the optical drive is broken (this happens frequently in reality) or the CD is broken, and Linux cannot be installed from the CD-ROM drive. 2) Software testers need to install a large number of Red Hat Linux test machines when setting up the test environment. At this time, the installation efficiency of the machine by hand is very low. 3) For IT support staff, it takes a lot of time to guide a RedHat Linux to install Red Hat Linux. Repeating this work day after day wastes valuable human resources. From the perspective of reducing business costs and improving the efficiency of the installation system, this article introduces a solution - network-based Red Hat unattended installation. This solution puts a lot of installation preparations on the server at one time, so you don't have to repeat these tasks for each client when you install it on the client, saving time and cost and improving efficiency. After a one-time environment setup, the solution can achieve a very high degree of automation: the user only needs to perform very few manual steps to complete the installation. The manual steps and automatic steps during the installation process are as follows: 1) Manual steps: Power on, select to boot from the network. If your solution is more complex and flexible, you may need to choose which system to install. In short, there are very few manual steps. 2) Automation steps: The remaining steps, including system settings, hard disk partitioning, and package installation, will all be done automatically. 2. Solution Description This solution needs to first set up a boot server and an install server (can be set on the same physical machine), and then start the installer stored on the boot server through the network. The installer will automatically access the installation setup files and installation media stored on the install server to complete the installation. The technology involved This solution mainly uses three technologies: 1) PXE protocol for booting Red Hat Linux installer from the network on the PC 2) Network installation function provided by Red Hat Linux installer (that is, accessing the installation media through the network) 3) The unattended installation feature provided by the Red Hat Linux installer (Red Hat is called kickstart) Techniques 1) and 2) are already covered in Resources 1 and 2. This article will focus on the uncovered and unattended installation features in the reference. Software and hardware requirements to complete the automated installation according to the method described in this article, you need the following hardware and software resources: A PC machine as a boot and install server (other architecture machines can also) A PC machine to be installed, his network card must carry PXE supports a built-in LAN. The two machines are connected to the same subnet. The schematic diagram of the Red Hat Linux installation media solution is shown in Figure 1. Figure 1 is a schematic diagram of the network installation environment. The entire installation environment consists of a local area network and three machines connected to the local area network: Boot Server, Installation Server, and Client to be installed. The boot server and the install server can be deployed on the same physical machine. Table 1 lists the hardware and software requirements for these machines, and the services and data loaded on them.

Fig. 1 Schematic diagram of network installation principle

Table 1 Software and hardware settings on each machine in the network installation environment Steps to implement this solution 1) Set up the startup server 2) Set up the installation server 3) From the network Start the machine to complete the installation steps 1) and 2) just do it once. For each machine that needs to install RedHat Linux, you need to deploy the corresponding data in the boot server and install server, and perform step 3). The following will lead you through these steps one by one. For the sake of simplicity, I will use examples to illustrate how to set up a boot server and install server on a PC with Red Hat Enterprise Linux AS 3 Update 5 installed and install Red Hat Enterprise Linux AS 4 Update 2 on a PC. 3 Step 1: Set up the boot server The purpose of the boot server is to help start the Red Hat Linux installer on the machine to be installed. A DHCP server and a TFTP server need to be set up on the boot server. The former is to assign an IP address to the machine to be installed, and the latter is to provide a way for the machine to be installed to download the boot image. Setting up a DHCP server 1) Install the DHCP server package (RPM package name: dhcpd). 2) Edit the DHCP server settings file /etc/dhcp.conf. Here is an example: option domain-name "mydomain"; ddns-update-style none; max-lease-time 7200; server-name "bootserver"; default-lease-time 600; allow booting; allow bootp; subnet 192.168 .138.0 netmask 255.255.255.0 { range192.168.138.1 192.168.138.254; denyunknown-clients; } group pxe { filename"pxelinux.0"; hosttestserver { hardware ethernet 00:0C:29:70:24:5B;fixed-address 192.168.138.30;} In this example, the defined subnet is 192.168.138.0/255.255.255.0. The host definition item testserver indicates that the IP address 192.168.138.30 will be assigned to the Ethernet card 00:0C:29:70:24:5B (the machine to be installed), and the file pxelinux.0 (in the root directory of the TFTP server) will be used as the boot image. The PXE client in the NIC ROM loads the memory and runs. For each additional machine to be installed, we need to add a host entry in dhcpd.conf. 3) Set an IP to the boot server. This IP must be in the subnet defined by the DHCP server. Here we use 192.168.138.1. See Resources 3 for information on how to set up an IP address for your Red Hat Linux system. 4) Start the DHCP service. [root@bsvr] #service dhcpd restart

Copyright © Windows knowledge All Rights Reserved