pxe 网络无人职守安装


具体配置
服务器端安装软件包

  
  
  
  
  1. yum install dhcpd xinetd tftp-server syslinux nfs-utils httpd system-config-kickstart 
服务器端配置dhcp服务
  
  
  
  
  1. cat /etc/dhcpd.conf 
  2. ddns-update-style interim;                                                   
  3. ignore client-updates; 
  4. allow bootp;                                                                 
  5. allow booting;                                                               
  6.                                                                              
  7. subnet 172.16.148.0 netmask 255.255.255.0 {                                  
  8.                                                                              
  9.         option routers                  172.16.148.129;                      
  10.         option subnet-mask              255.255.255.0;                       
  11.                                                                              
  12.         next-server 172.16.148.129;                                          
  13.         filename="pxelinux.0";                                               
  14.         option time-offset              -18000; # Eastern Standard Time      
  15.                                                                              
  16.         range dynamic-bootp 172.16.148.129 172.16.148.140;                   
  17.         default-lease-time 21600;                                            
  18.         max-lease-time 43200;                                                
  19.         } 

设置tftp服务
 
  
  
  
  
  1. chkconfig xinetd on 
  2.  
  3. chkconfig tftp on 
将网络安装所需要的启动和映像文件copy到/tftpboot
  
  
  
  
  1. cp initrd.img vmlinuz /tftpboot/ 

在tftpboot目录中建立pxelinux.cfg目录

  
  
  
  
  1. mkdir /tftpboot/pxelinux.cfg 
在pxelinux.cfg目录中建立pxe配置文件default
  
  
  
  
  1. [root@centos129 pxelinux.cfg]# cat default 
  2. default local 
  3. prompt 1 
  4. timeout 60 
  5. label local 
  6. localboot 
  7. label install 
  8. kernel vmlinuz 
  9. append initrdinitrd=initrd.img ramdisk_size=8192 ks=http://172.16.148.129/ks.cfg 
配置NFS提供安装内容目录的服务
将光盘安装文件目录复制到/opt/centos下
配置nfs服务

  
  
  
  
  1. cat /etc/exports 
  2. /opt/centos     *(rw,root_squash) 
利用system-config-kickstart生成ks.cfg文件,将ks.cfg文件cp到httpd的跟目录下
启动服务
nfs xinetd httpd tftp
客户端设置
确保网卡支持pxe启动方式
 
 
 

你可能感兴趣的:(网络,安装,职场,休闲)