Network Installation CentOS 5.3

Source: Internet
Author: User
Tags get ip

0. Basic requirements

(1) Need to use at least two servers: one has no operating system, is the server we are about to install, the other is a server that has already installed the operating system, we use to store CentOS installation files.

(2) The NIC to install the operating system must support the ticket PXE protocol, and the motherboard BIOS has been set to "Nic Boot".

1. Installation principle Process

(1) After the boot, boot through the network card;

(2) The network card obtains a temporary IP address through the DHCP;

(3) Obtain the kernel image file from TFTP and use the kernel file to start the installer;

(4) After starting Setup, choose Remote Installation Mode (HTTP, FTP or NFS) for installation.

2. Installation process

The installation process saves the required files on the CentOS 5.3 host and installs the system as CentOS 5.3.

(1) Configure the DHCP server

If two machines have a DHCP server on their local area network, you can skip this step, otherwise you will need to configure your own DHCP server.

A) Remove the DHCP installation file from the CentOS CD and install it (assuming our optical drive hangs under the/media/centos_5.3_final directory, below):

# rpm-ivh/media/centos_5.3_final/centos/dhcp-3.0.5-18.el5.x86_64.rpm

b) Edit the DHCP configuration file as follows:

Ddns-update-style none; Allow booting; Allow BOOTP; # Set the DHCP scope of the first network card, the actual use of the second network card DHCP, the section # can be omitted, the main reference to the second network card DHCP configuration subnet 192.168.20.0 netmask 255.255.255.0{option routers 192.168.20.254; Option Subnet-mask 255.255.255.0; Option Domain-name "CentOS"; Option Domain-name-servers 159.226.39.1; Range 192.168.20.200 192.168.20.250; Default-lease-time 21600; Max-lease-time 43200; # Set the DHCP scope of the second network card subnet 10.60.1.0 netmask 255.255.255.0{# The files required for remote boot installation, which are stored in the TFTP directory, see filename "pxelinux.0" below; # Next Hop Address that specifies the location of the server where TFTP resides Next-server 10.60.1.91; # Set Default gateway option routers 10.60.1.254; Option Subnet-mask 255.255.255.0; # domain name, you can set up a random, no impact, you can omit option Domain-name "CentOS"; # set domain name resolution server, for network installation also has no effect, you can omit option domain-name-servers 159.226.39.1; # DHCP server IP distribution range 10.60.1.200 10.60.1.250; # Lease valid time, according to the following settings can be Default-lease-time 21600; Max-lease-time 43200; }

c) restarting the DHCP service

#service dhcpd Restart

D Verify DHCP service availability from any one of Linux on the same LAN: # dhclient Eth0 If you can get IP, the DHCP server is starting up properly. (2) Install configure TFTP Server A) obtain and install the TFTP service side from the CentOS installation disk: # rpm-ivh/media/centos_5.3_final/centos/ TFTP-SERVER-0.42-3.1.EL5.CENTOS.X86_64.RPM b) Configure TFTP and modify/etc/xinetd.d/tftp for the following: # Default:off # description:the TFTP The server serves files using the trivial file transfer/# protocol. The TFTP protocol is often used to boot diskless/# workstations, download configuration files to network-aware printers, /# and to-start the installation process for some operating systems. Service TFTP {socket_type = Dgram protocol = UDP wait = Yes user = root server =/usr/sbin/in.tftpd # tftp file path Server_arg s =-s/tftpboot # to no boot tftp disable = no Per_source = one CPS = 2 flags = IPV4} c) Restart the XINETD service to start the TFTP #service xine TD Start D tests if TFTP is normal in the TFTP directory (/tftpboot) to create a file, such as 1.txt, open the terminal to execute the following command, if the file can be downloaded from TFTP, the configuration is successful. #tftp localhost tftp>get 1.txt If you do not have a TFTP command, you need to install the package: # rpm-ivh/media/centos_5.3_final/centos/ Tftp-0.42-3.1.el5.centos.x86_64.rpm e) Copy network installation must be several files to the/tftpboot directory # cp/media/centos_5.3_final/images/pxeboot/initrd.img/tftpboot/# cp/media/ centos_5.3_final/images/pxeboot/vmlinuz/tftpboot/# cp/media/centos_5.3_final/isolinux/*.msg/tftpboot/# mkdir/ tftpboot/pxelinux.cfg/# Cp/media/centos_5.3_final/isolinux/isolinux.cfg/tftpboot/pxelinux.cfg/default In addition to the above several files and a directory, you need a file: pxelinux.0. This file is located on the installation disk:/media/centos_5.3_final/centos/syslinux-3.11-4.x86_64.rpm unzip the RPM package, you can find the file from the unpacked package: # Rpm2cpio/media /centos_5.3_final/centos/syslinux-3.11-4.x86_64.rpm | CPIO-DIV # CP./usr/lib/syslinux/pxelinux.0/tftpboot (3) installation Configure FTP Server A) install vsftp #rpm-ivh/media/centos_5.3_final/centos/ vsftpd-2.0.5-12.el5.x86_64.rpm b) Copies all files in/media/centos_5.3_final/to the/VAR/FTP directory and tests the connectivity of the FTP. This is more common, there is no listing of specific practices. 3. Start the network installation in the upcoming installation of the operating system of the machine, set up the BIOS from the network card to start, and then start the computer, you can automatically enter the installation program, in the choice of installation media, select FTP, enter the FTP address xx.xx.xx.xx, select the installation path is/(that is, the And then the next machine, all the installation process is the same as the CD-ROM installation.

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.