Pxe&centos Batch Installation

Source: Internet
Author: User

PXE Batch Installation CENTOS6 system

This experiment was adopted pxe/ftp/dhcp/tftp to complete the batch deployment CentOS system

Installation:

Yum install-y dhcp* tftp* vsftp

------------------------------------------DHCP-----------------------------------------

[Email protected] pub]# cat/etc/dhcp/dhcpd.conf

Ddns-update-style Interim;

Ignore client-updates;

Allow booting;

Allow BOOTP;

Subnet 192.168.12.0 netmask 255.255.255.0 {

Option routers 192.168.12.2;

Option Subnet-mask 255.255.255.0;

Range 192.168.12.100192.168.12.200;

Next-server 192.168.12.135;

FileName "pxelinux.0";

}

------------------------------------------TFTP---------------------------------------

[Email protected] pub]# cat/etc/xinetd.d/tftp

Service TFTP

{

Socket_type = Dgram

protocol = UDP

wait = no

user = root

Server =/usr/sbin/in.tftpd

Server_args =-s/tftpboot Specify the root directory

Disable = no

Per_source = 11

CPS = 100 2

Flags = IPV4

}

[Email protected] pub]#

FTP as a disc image and ks.cfg configuration file download using

Mount/dev/cdrom/var/ftp/pub

Yuminstall Syslinux syslinux-devel-y

# if it is 6.x the system executes this command

Cp/usr/share/syslinux/pxelinux.0/var/ftp/pub

cp/mnt/images/pxeboot/{vmlinuz,initrd.img}/tftpboot Startup file

Cd/tftpboot

Mkdir-p pxelinux.cfg

cp/mnt/isolinux/isolinux.cfg Pxelinux.cfg/default It's over !

-----------------------------------------------default------------------------------------------------

[Email protected] pub]# cd/tftpboot/pxelinux.cfg/

[[email protected] pxelinux.cfg]# cat Default

Default Linux

Prompt 1

Timeout 10

Display Boot.msg

F1 boot.msg

F2 options.msg

F3 general.msg

F4 param.msg

F5 rescue.msg

Label Linux

Kernel Vmlinuz

Append initrd=initrd.img ks=ftp://192.168.12.135/pub/centos_ks.cfg Ksdevice=eth0

Label text

Kernel Vmlinuz

Append initrd=initrd.img Text

Label KS

Kernel Vmlinuz

Append KS initrd=initrd.img

Label Local

Localboot 1

Label Memtest86

Kernel memtest

Append-

--------------------------------------ks.cfg-----------------------------------------

[email protected] pub]# cat centos_ks.cfg

# Kickstart file automatically generated by Anaconda.

Install

URL--url=ftp://192.168.12.135/pub/

Key--skip

Lang Zh_cn. UTF-8

Keyboard US

Network--device eth0--bootproto=dhcp--noipv6

ROOTPW [email protected]

Firewall--disabled

Authconfig--enableshadow--ENABLEMD5

SELinux--disabled

TimeZone Asia/shanghai

Bootloader--location=mbr--driveorder=sda--append= "RHGB quiet"

Clearpart--all--initlabel

Part/boot--fstype ext3--size=200

Part swap--size=4000

Part/www/logs--fstype ext3--size=20000

Part/--fstype ext3--size=20000

Part/home--fstype ext3--size=10000

Part/www--fstype ext3--size=1--grow

%packages

# @admin-tools

@base

@core

# @development-libs

# @development-tools

# @editors

# @system-tools

# @base-X

@chinese-support

Keyutils

Kexec-tools

Trousers

Fipscheck

Device-mapper-multipath

Imake

--------------------------OK------------------------------------------

The following are the configuration methods for PXE-supported LVM:

[email protected] ~]# vim/var/ftp/ks.cfg
...... Above omitted ...
# Partition Clearing Information
Clearpart--all--initlabel
# Disk Partitioning Information
part/boot--asprimary--fstype= "Ext4"--size=300 # #The boot partition must be a primary partition
Part swap--fstype= "swap"--size=2048 # #SWAP分区
Part pv.01--size=1–grow # #剩余空间建立物理卷
Volgroup vg_root pv.01 # #建立卷组
Logvol/--vgname=vg_root--size=20480--name=lv_root # #建立根逻辑卷
Logvol/var--vgname=vg_root--size=10240--name=lv_var # #建立var目录逻辑卷
Logvol/home--vgname=vg_root--size=40960--name=lv_home # #建立家目录逻辑卷
# #以上空间大小根据实际需要和磁盘空间情况进行调整
%packages
@base
@chinese-support
@console-internet
@core
...... The following omit ...


This article is from the "You Insist" blog, please be sure to keep this source http://whlai51.blog.51cto.com/2164371/1679240

Pxe&centos Batch 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.