利用网卡安装CENTOS5.5

存放光盘的服务器:192.168.68.57  (tftp,dhcp,nfs)
准备利用PXE网卡安装的服务器:192.168.68.54-192.168.68.55 (dhcp分配)

一,安装DHCP
yum install dhcp*


# vim /etc/dhcpd.conf

ddns-update-style interim;
ignore client-updates;
allow bootp;
allow booting;
class "pxeclients"{
match if substring(option vendor-class-identifier,0,9) = "PXEClient";
filename "/pxelinux.0";
next-server 192.168.68.57;
}
subnet 192.168.68.0 netmask 255.255.255.0 {
option routers 192.168.68.1;
option subnet-mask 255.255.255.0;
option domain-name "dog.com";
option domain-name-servers 192.168.0.2;
option time-offset -18000;
range dynamic-bootp 192.168.68.54 192.168.68.55;
default-lease-time 21600;
max-lease-time 43200;
}

#service dhcpd start


二,安装TFTP
yum -y install tftp-server  syslinux
 xinetd 默认装了,没装的话装上。
配置:

# vim /etc/xinetd.d/tftp

service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -u nobody -s /tftpboot
        disable                 = no      //修改这个
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

#service xinetd restart

#mkdir /tftpboot

#cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
#cp /usr/lib/syslinux/menu.c32 /tftpboot/
#cp /usr/lib/syslinux/memdisk /tftpboot/
#cp /usr/lib/syslinux/mboot.c32 /tftpboot/
#cp /usr/lib/syslinux/chain.c32 /tftpboot/


#mkdir /tftpboot/pxelinux.cfg
#cp /mnt/iso/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default

#cp /mnt/iso/isolinux/* /tftpboot/                     复制光盘的内核
 

安装NFS
#yum install nfs-utils portmap
#vim /etc/exports
/mnt/iso    192.168.68.0/24(ro,sync)

重启

#service portmap start
#service nfs start

--------------------------------------------------------
一台新的服务器  网卡必须支持PXE
网卡启动 ----然后会获得ip  -----进入选择界面----一直选到NFS模式安装
输入:(第三项可以不填)
192.168.68.57
/mnt/iso

 

你可能感兴趣的:(centos,职场,网卡,休闲,centos5.5)