CentOS6.4 building PXE automatic installation Linux system

Source: Internet
Author: User

Server IP Address: 192.168.10.25

Services that the server needs to install:

DHCP service to provide the client IP address;

TFTP service, which provides the file download that must be installed

The steps are as follows:

First, the server to build DHCP services

1. Install the DHCP server terminal program

# yum Install DHCP

2. Copy the dhcpd.conf template file

# cp/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample/etc/dhcp/dhcpd.conf

3. Use Vim to edit the dhcpd.conf configuration file

# vim/etc/dhcp/dhcpd.conf

in command line mode * * * Release all configuration information

:., $s/^[^#]/#&/g

4. Adding configuration information

Default-lease-time 600; #默认租约时间600秒

Max-lease-time 7200; #最大租约时间7200秒

Subnet 192.168.10.0 netmask 255.255.255.0 {#192.168.10.0 segment

Range 192.168.10.80 192.168.10.100; #地址范围192.168.10.80-192.168.10.100

Option routers 192.168.10.25; #默认网关

Next-server 192.168.10.25; #tftp服务器地址

Filename= "pxelinux.0"; #bootloader

}


Second, TFTP server Setup

1. Installing the TFTP service

#yum Install Tftp-server

2. Start the TFTP service on boot

#chkconfig TFTP on

3, open xinetd service, TFTP needs xinetd service

#/etc/init.d/xinetd start

4. Copy the kernel inside the Pxeboot file inside the CD to the Tftpboot directory

Mounting discs

#mount/dev/cdrom/mnt

Copying files

#cp/mnt/images/pxeboot/{initrd.img,vmlinuz}/var/lib/tftpboot/

#cp/mnt/isolinux/{boot.msg,vesamenu.c32,splash.jpg}/var/lib/tftpboot/

Install the Syslinux and copy to the Tftpboot directory

#yum Install Syslinux

#cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

#[-d/var/lib/tftpboot/pxelinux.cfg] | | Mkdir/var/lib/tftpboot/pxelinux.cfg;cp/mnt/isolinux/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default

Third, install the HTTP service

1. Installation httpd Service

#yum Install httpd

2. Start httpd Service

#/etc/init.d/httpd start

Bind disc to HTTP directory, install tree

1, mkdir/var/www/html/centos6.4

2. Mount--bind/mnt//var/www/html/centos6.4/

Iv. Configuring the Kickstart file

#cp/root/anaconda.cfg/var/www/html/ks.cfg

#vim/var/www/html/ks.cfg (Ensure that other users of the file have read access)

Firewall--disabled

Install

URL--url=http://192.168.10.25/ks.cfg

ROOTPW--iscrypted $1$42dlualw$tswrz2wjsusgqjuztpgdk/

Auth--useshadow--passalgo=md5

Graphical

Firstboot--disable

Keyboard US

Lang en_US

SELinux--disabled

Logging--level=info

Reboot

TimeZone Asia/shanghai

Network--bootproto=dhcp--device=eth0--onboot=on

Bootloader--append= "Crashkernel=auto rhgb quiet"--location=mbr--driveorder= "SDA"

Zerombr

Clearpart--all--initlabel

Part/boot--fstype= "Ext4"--size=200

Part swap--fstype= "swap"--size=1024

Part/--fstype= "EXT4"--grow--size=1


%packages

@Base

@Core

@Desktop

@Fonts

@General Purpose Desktop

@Internet Browser

@Printing Client

@X Window System

Binutils

Gcc

Kernel-devel

Make

Patch

Python


%end


2, in the/var/lib/tftpboot/pxelinux.cfg/default file inside the first

Append initrd=initrd.img ks=http://192.168.10.25/ks.cfg

Add Font section

This article is from the "Ops" blog, please make sure to keep this source http://67263992.blog.51cto.com/3718090/1622044

CentOS6.4 building PXE automatic installation Linux system

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.