centos6.5 装备PXE体系ITeye - 凯时娱乐

centos6.5 装备PXE体系ITeye

2019年03月27日15时08分44秒 | 作者: 平安 | 标签: 参阅,封闭,文件 | 浏览: 2600

参阅

yum install -y vsftpd syslinux dnsmasq


dnsmasq
mv /etc/dnsmasq.conf  /etc/dnsmasq.conf.backup
mkdir -p /var/tftpboot


  # DHCP range-leases
  dhcp-range=192.168.112.3,192.168.112.253,255.255.255.0,12h
 
  # PXE
  dhcp-boot=pxelinux.0
 
  # Gateway
  dhcp-option=3,192.168.112.2
  enable-tftp
  tftp-root=/var/tftpboot
 
  cp -r /usr/share/syslinux/* /var/tftpboot
  mkdir /var/tftpboot/pxelinux.cfg
  touch /var/tftpboot/pxelinux.cfg/default
 
  mkdir /var/tftpboot/centos6
  mkdir /mnt/images
  mount -o loop /home/CentOS-6.5-x86_64-bin-DVD1.iso /mnt/centos
  cp /mnt/centos/images/pxeboot/vmlinuz  /var/tftpboot/centos6
  cp /mnt/centos/images/pxeboot/initrd.img  /var/tftpboot/centos7
 
  chmod -R 755  /var/tftpboot/
 
  mkdir /var/ftp/pub/centos6.5x64
  cp -rv /mnt/centos/* /var/ftp/pub/centos6.5x64/
 
 
 
  封闭selinux
  setenforce 0
 
  # netstat -tulpn
  # firewall-cmd add-service=ftp permanent  Port 21
  # firewall-cmd add-service=dns permanent  Port 53
  # firewall-cmd add-service=dhcp permanent  Port 67
  # firewall-cmd add-port=69/udp permanent  Port for TFTP
  # firewall-cmd add-port=4011/udp permanent  Port for ProxyDHCP
  # firewall-cmd reload  Apply rules
 
 
 
  # systemctl start dnsmasq
# systemctl status dnsmasq
# systemctl start vsftpd
# systemctl status vsftpd
# systemctl enable dnsmasq
# systemctl enable vsftpd


kickstart文件 运用下面的东西生成
yum install -y system-config-kickstart

改IP
/etc/dnsmasq.conf
/var/tftpboot/pxelinux.cfg/default
/var/ftp/pub/centos6.5x64/centos6-ks.cfg
#/var/tftpboot/pxelinux.cfg/default
 default menu.c32
 prompt 0
 timeout 300
 ONTIMEOUT local
 menu title  PXE Boot Menu 
 label 1
 menu label ^1) Install CentOS 6 x64 with Local Repo
 kernel centos6/vmlinuz
 #append initrd=centos6/initrd.img method=ftp://192.168.112.11/pub/centos6.5x64 devfs=nomount
 append ks=ftp://192.168.112.11/pub/centos6.5x64/centos6-ks.cfg initrd=centos6/initrd.img devfs=nomount
 label 2
 menu label ^2) Install CentOS 6 x64 with Local Repo using VNC password vnc123
 kernel centos6/vmlinuz
 append initrd=centos6/initrd.img method=ftp://192.168.112.11/pub/centos6.5x64 devfs=nomount inst.vnc inst.vncpassword=vnc123
label 3
 menu label ^3) Install CentOS 7 x64 with Local Repo
 menu default
 kernel centos7/vmlinuz
 #append initrd=centos7/initrd.img method=ftp://192.168.112.11/pub/centos7x64 devfs=nomount
 append ks=ftp://192.168.112.11/pub/centos7x64/centos7-ks.cfg initrd=centos7/initrd.img devfs=nomount
label 4
 menu label ^4) Install CentOS 7 x64 with Local Repo using VNC password vnc123
 kernel centos7/vmlinuz
 append initrd=centos7/initrd.img method=ftp://192.168.112.11/pub/centos7x64 devfs=nomount inst.vnc inst.vncpassword=vnc123
 label 5
 menu label ^5) Boot from local drive
版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表凯时娱乐立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章