PXE网络安装服务器

 

 

PXE网络安装服务器

系统环境:redhat6.2_x86

安装所需的软件包:

yum install dhcp httpd tftp-server system-config-kickstart -y

通过http服务共享安装介质

mkdir -p /var/www/html/rhel6

mount -o loop rhel6.2.iso /var/www/html/rhel6

使用system-config-kickstart编辑ks.Cfg文件,并保存到/var/www/html/

配置tftp服务:

cp /var/www/html/rhel6/isolinux/* /var/lib/tftpboot

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

mkdir  /var/lib/tftpboot/pxelinux.cfg

cp /var/lib/tftpboot/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default

vi /var/lib/tftpboot/pxelinux.cfg/default

label linux

  menu label Install rhel6 system

  menu default

  kernel vmlinuz

  append initrd=initrd.img ks=http://10.43.6.149/ks.cfg

label rescue

  menu label Rescue installed system

  kernel vmlinuz

  append initrd=initrd.img rescue

chkconfig tftp  on

service xinetd start

netstat -anulp |grep :69

udp        0      00.0.0.0:69                 0.0.0.0:*                               2423/xinetd

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

配置dhcp服务

vi  /etc/dhcp/dhcpd.conf

option domain-name "example.com";

option domain-name-servers10.43.6.149

default-lease-time 600;

max-lease-time 7200;

ddns-update-style none;

authoritative;

log-facility local7;

subnet10.43.6.0 netmask 255.255.254.0 {

  range10.43.6.100 10.43.6.200;

  option routers10.43.7.254;

}

filename "pxelinux.0";

next-server10.43.0.149;

chkconfig dhcpd on

service dhcpd star

                                        [email protected]


你可能感兴趣的:(PXE网络安装)