Chinaunix首页 | 论坛 | 博客
  • 博客访问: 588321
  • 博文数量: 187
  • 博客积分: 10025
  • 博客等级: 上将
  • 技术积分: 2990
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-18 17:40
文章分类

全部博文(187)

文章存档

2010年(1)

2009年(23)

2008年(163)

我的朋友

分类: LINUX

2008-12-10 11:02:46

RHCE Lab1.1: Auto Installation
RHCE Lab1.1: Auto installation with PXE+DHCP+TFTP+NFS/HTTP/FTP+Kickstart

1. Preparing the boot server (dhcp, tftp)

A. Installing DHCP server

#yum install dhcp

#vi /etc/dhcpd.conf

ddns-update-style interim;
ignore client-updates;

allow booting;
allow bootp;

class "pxeclients"{
match if substring(option vendor-class-identifier,0,9) = "PXEClient";
filename "centos5u2/pxelinux.0";
next-server 192.168.75.11;
}
subnet 192.168.75.0 netmask 255.255.255.0 {
option routers 192.168.75.2;
option subnet-mask 255.255.255.0;
option domain-name "";
option domain-name-servers 192.168.75.2;
option time-offset -18000;
range dynamic-bootp 192.168.75.1 192.168.75.254;
default-lease-time 21600;
max-lease-time 43200;
}

#service dhcpd restart

B. Installing TFTP server

#yum install xinetd

#yum install tftp-server

#vi /etc/xinetd.d/tftp

service tftp
{
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -s /tftpboot
    disable         = no
}
#mkdir /mnt/iso
#mount -o loop centos.5.2.iso  /mnt/iso
#mkdir -p /tftpboot/centos5u2
#mkdir -p /tftpboot/centos5u2/pxelinux.cfg
#cp /usr/lib/syslinux/pxelinux.0 /tftpboot/centos5u2/
#cp /mnt/iso/isolinux/*.msg /tftpboot/centos5u2/
#cp /mnt/iso/images/pxeboot/initrd.img /tftpboot/centos5u2/
#cp /mnt/iso/images/pxeboot/vmlinuz /tftpboot/centos5u2/
#cp /mnt/iso/isolinux/isolinux.cfg /tftpboot/centos5u2/pxelinux.cfg/default
#vi /tftpboot/centos5u2/pxelinux.cfg/default
default autoinstall
prompt 1
timeout 100
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
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 -
label autoinstall
kernel vmlinuz
append ks= initrd=initrd.img
#service xinetd restart
2. Preparing the installation server (HTTP, NFS, FTP)
Please refer to RHCT Lab1

3. Preparing the ks.cfg file

Please refer to RHCE Lab1

4. Installing the CentOS5 client with PXE

Set BIOS to boot from Network PXE

boot:autoinstall

阅读(1276) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~