PXE装机部署

PXE装机部署

安装dhcp服务并修改配置文件
yum -y install dhcp
[root@pxe-zhuangji ~]# cat /etc/dhcp/dhcpd.conf 
default-lease-time 60000;
max-lease-time 720000;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.11 192.168.1.100;
  option routers 192.168.1.254;
  option broadcast-address 192.168.1.255;
  default-lease-time 60000;
  max-lease-time 720000;
  next-server 192.168.1.11;      #填本机ip
  filename "pxelinux.0";
}
安装tftp, tcp_wrappers-devel,syslinux并配置
yum -y install tftp-server syslinux  tcp_wrappers-devel   #  tftp不能独立启动需要安装xinetd

# 修改xinetd服务    
vim  /etc/xinetd.d/tftp     dilable = no

# 重启xinetd,tftp服务
systemctl restart xinetd
systemctl enable xinetd
systemctl status xinetd
systemctl restart tftp
systemctl enable tftp
systemctl status tftp
从镜像文件拷贝以下文件并设置777权限
cd /var/lib/tftpboot
boot.msg  initrd.img  pxelinux.0  vesamenu.c32  vmlinuz 
mkdir pxelinux.cfg
创建default文件
[root@pxe-zhuangji pxelinux.cfg]# cat default
default vesamenu.c32
timeout 60

display boot.msg
menu clear
menu background splash.png
menu title Red Hat Enterprise Linux 7.2
menu vshift 8
menu rows 18
menu margin 8
menu helpmsgrow 15
menu tabmsgrow 13
menu color border * #00000000 #00000000 none
menu color sel 0 #ffffffff #00000000 none
menu color title 0 #ff7ba3d0 #00000000 none
menu color tabmsg 0 #ff3a6496 #00000000 none
menu color unsel 0 #84b8ffff #00000000 none
menu color hotsel 0 #84b8ffff #00000000 none
menu color hotkey 0 #ffffffff #00000000 none
menu color help 0 #ffffffff #00000000 none
menu color scrollbar 0 #ffffffff #ff355594 none
menu color timeout 0 #ffffffff #00000000 none
menu color timeout_msg 0 #ffffffff #00000000 none
menu color cmdmark 0 #84b8ffff #00000000 none
menu color cmdline 0 #ffffffff #00000000 none
menu tabmsg Press Tab for full configuration options on menu items.
menu separator # insert an empty line
menu separator # insert an empty line


label linux
  menu label ^Install Red Hat PXE  7.2
  menu default
  kernel vmlinuz
  append initrd=initrd.img inst.ks=ftp://192.168.1.11/redhat7.2/ks.cfg  quiet


拷贝ks.cfg文件到指定位置
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值