1. 程式人生 > 實用技巧 >Wi Linux pxe安裝手冊

Wi Linux pxe安裝手冊

首先安裝所需要包

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

掛載WiLinux的DVD光碟,並複製第一張光碟下的所有內容(檔案和資料夾)到到/var/wwwhtml/下cp –rf  /mnt/cdrom/*  /var/www/html/


配置dhcp服務

vi /etc/dhcp/dhcpd.conf

servicedhcpd restart

chkconfigdhcpd on

更改配置檔案

1.#option domain-name-servers 10.0.0.1; 
2.max-lease-time 7200; 
3.authoritative; 
4.
5.subnet 10.0.0.0 netmask 255.255.255.0 { 
6. range 10.0.0.1 10.0.0.253; 
7. next-server 10.0.0.8; 
8. filename "pxelinux.0"; 
9. } 


配置nfs伺服器


vi /etc/exports


/os * (ro) 根據實際放ISO映象目錄

/tftpboot * (ro)


servicenfs restart

chkconfignfs on



配置tftp伺服器


vi /etc/xinted.d/tftp


  1. # default: off

  2. # description: The tftp server serves files using the trivial file transfer \

  3. # protocol. The tftp protocol is often used to boot diskless \

  4. # workstations, download configuration files to network-aware printers, \

  5. # and to start the installation process for some operating systems.

  6. service tftp

  7. {

  8. socket_type = dgram

  9. protocol = udp

  10. wait = yes

  11. user = root

  12. server = /usr/sbin/in.tftpd

  13. server_args = -s /var/lib/tftpboot

  14. disable = no

  15. per_source = 11

  16. cps = 100 2

  17. flags = IPv4

  18. }

  19. [[email protected] html]#


servicexinetd restart

chkconfigxinetd on

然後是system-config-kickstart圖形介面下配置(如圖1)

161843944.jpg

本次配置是NFS,所以選擇NFS(如圖2)

161929586.jpg

選擇安裝分割槽(如圖3)

162111880.jpg

配置完成後,儲存為ks.cfg檔案

162210128.jpg

建立tftpboot資料夾,並把配置檔案複製過去

進入tftpboot 資料夾沒有就重建一個

#Cd /var/lib/tftpboot

#Mkdir/var/lib/tftpboot

  1. mkdir /tftpboot

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

3.cp/usr/share/syslinux/vesamenu.c32/var/lib/tftpboot

  1. cd /var/www/html/p_w_picpath/pxeboot/

  2. cp initrd.img var/lib/tftpboot

  3. cp vmlinux /var/lib/tftpboot

  4. cp /var/www/html/isolinux/*.msg var/lib/tftpboot

  5. mkdir /tftpboot/pxelinux.cfg

  6. cp /var/www/html/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default

複製kickstart儲存的檔案到OS下


cp /ks.cfg /os


更改/tftpboot/pxelinux.cfg/deafault檔案增加nfs目錄


ks=nfs:192.168.1.221:/iso/ks.cfg

儲存後即可新增新的裝置網路安裝

轉載於:https://blog.51cto.com/waycooler/1211334