您的位置:首页 > 编程语言 > PHP开发

PXE+TFTP+VSFTP+DHCP+Kickstart无人职守自动安装RHEL5

2010-06-15 20:56 766 查看
1、安装并配置:DHCP服务:
1)yum list |grep dhcp

2)yum install dhcp* -y

3)编辑/etc/dhcpd.conf

√rpm -ql dhcp

√找到dhcpd.conf.example这个文件,复制到/etc下,替换dhcpd.conf

Cp /usr/share/doc/dhcpd.conf.example /etc/dhcpd.conf

√vim /etc/dhcpd.conf

修改成如下:(注意红色部分)

***********************************************************************
ddns-update-style interim;

ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {

# --- default gateway

option routers 192.168.1.1;

option subnet-mask 255.255.255.0;
# option nis-domain "domain.org";

# option domain-name "domain.org";

# option domain-name-servers 192.168.1.1;

option time-offset -18000; # Eastern Standard Time

filename "pxelinux.0";

next-server 192.168.1.88;

# option ntp-servers 192.168.1.1;

# option netbios-name-servers 192.168.1.1;

# --- Selects point-to-point node (default is hybrid). Don't change this unless

# -- you understand Netbios very well

# option netbios-node-type 2;

range dynamic-bootp 192.168.1.100 192.168.1.120;

default-lease-time 21600;

max-lease-time 43200;
# we want the nameserver to appear at a fixed address

host ns {

next-server marvin.redhat.com;

hardware ethernet 00:16:D3:07:68:27;

fixed-address 192.168.1.88;

}

}

***************************************************************************
√chkconfig dhcpd on

√service dhcpd restart

√如果报错,则查看log日志,cat /var/log/message

2、安装tftp:

1)安装完成后会在根目录产生一个tftpboot文件夹

Chkconfig tftp on

Service xinetd restart

2)复制必要的文件:

Cd /tftpboot

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

Cp /光盘/image/pxeboot/initrd.img

Cp /光盘/image/pxeboot/vmlinuz

Mkdir /tftpboot/pxelinux.cfg

Cp /光盘/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default

3)编辑default文件:

*************************************************************************
default linux

prompt 1

timeout 600

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 linux ks=ftp://192.168.1.88/ks.cfg
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 -
ftp://192.168.1.88/tftpboot/ *************************************************************
3配置ks.cfg文件:
完成后拷贝到/var/ftp/目录中,和上面红字对应。(不要忘记安装VSFTP服务并配置)
备注:
启动时如果在第一个界面DCHP 后面的那个-都跳不过去,也就是检测不到 DHCP服务器就说明DHCP的设置有问题!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  DHCP PXE TFTP