Use the image file to remotely install the configured Linux

Source: Internet
Author: User
Use the image file to remotely install the configured Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. [Goal]

There are a batch of servers with the same configuration. Now you need to install the same operating system and perform the same configuration through the network (tftp.

[Idea]

1. Install a standard server, configure it, and package it.

2. Start the target machine through PXE and partition the target machine

3. Extract the prepared image file to the target machine.

4. Install the boot system.



1. Install PXE server

1. software requirements:

Dhcp-the target machine obtains the IP address from the server through the pxe Nic

TFTP --- obtain the boot file initrd from pxe server after obtaining the IP address from the target machine

RedHat AS3.1 --- PXE server OS. You can do anything else.

2. Install DHCP.

Directly use the built-in dhcp server. The configuration file is as follows:

[Root @ backup etc] # cat dhcpd. conf

Ddns-update-style ad-hoc;

Filename "/pxelinux.0 ";

Max-lease-time 86400;

Default-lease-time 43200;



Subnet 192.168.100.0 netmask 255.255.255.0 {

Range 192.168.100.10 192.168.100.254;

Option broadcast-address 192.168.100.255;

}

3. Install TFTP

Directly use the built-in tftp and syslinux packages.

# Cp/usr/lib/syslinux/pxelinux.0/tftpboot/



Copy the kernel and initrd files to/tftpboot (the initrd file needs to be customized and the method is available later)



Modify the/tftpboo/pxelinux. cfg/default file with the following content:

[Root @ backup pxelinux. cfg] # more default

PROMPT 1

TIMEOUT 500000

DISPLAY msg

Default NULL



Label 1

Kernel vmlinuz-new

Append initrd = initrd-new ramdisk_size = 4250 load_ramdisk = 1 prompt_ramdisk = 0 root =/dev/ram0 rw



Add a file/tftpboot/msg, Which is prompted during pxe boot.



Modify/etc/xinet. d/tftp and change disable = yes to no. Note:

There is a row in this file: server_args =-s/tftpboot. Is it recommended to write server_args =-s/tftpboot? L, the following-l parameter can allow tftp to write logs. However, if this parameter is set, the target machine cannot obtain files from tftp, in/var/log/message, there is a large amount of information indicating that the address is already in use, so this parameter is not required.



Modify/etc/services and add the following items:

Tftp 69/tcp

Tftp 69/udp

Pxe 67/udp

Pxe 4011/udp



Restart xinetd service, start dhcp, start the target machine, and start it from the network to see if the IP address can be obtained and the prompt content of the msg file is displayed, if there is no problem, you can proceed.

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.