pxe

1.需要的安装包
system-config-kickstart        ##自动应答脚本制作工具
syslinux                               ##获得pxelinux.0文件安装包
dhcp                                    ##分配ip给客户机的服务
tftp-server                           ##提供tftp协议的服务
httpd                                   ##安装源共享服务

2.配置dhcp
vim   /etc/dhcpd/dhcpd.conf

option domain-name "example.com";                   ##域名
option domain-name-servers 192.168.0.79;       ##dns
default-lease-time 600;                                       ##默认租约期
max-lease-time 7200;                                         ##最长租约期
log-facility local7;                                                ##日志级别
subnet 192.168.0.0 netmask 255.255.255.0 {    ##网段,子网掩码
  range 192.168.0.102 192.168.0.111;               ##地址范围
  option routers 192.168.0.254;                          ##网关
  filename "pxelinux.0";                                       ##pxe启动程序
  next-server 192.168.0.79;                               ##tftp主机地址
}
systemctl restart dhcpd
systemctl stop firewalld

3.配置 TFTP
config /etc/xinetd.d/tftp like this:
service tftp
{
        socket_type        = dgram
        protocol              = udp
        wait                     = yes
        user                    = root
        server                 = /usr/sbin/in.tftpd
        server_args        = -s /var/lib/tftpboot
        disable                = <<<<<<<<<yes--->no>>>>>>
        per_source         = 11
        cps                     = 100 2
        flags                   = IPv4
}
systemctl restart xinetd

4.配置pxe
1)
cd /var/lib/tftpboot/
mkdir pxelinux.cfg
2)
mount the iso of the rhel7
cp isolinux/* /var/lib/tftpboot
3)
cp /var/lib/tftpboot/isolinux.cfg   /var/lib/tftpboot/pxelinux.cfg/default
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
4)
make a userfully install source and kickstart,my of this is in the ftp's pub
ftp://192.168.0.252/pub/rhel6
ftp://192.168.0.252/pub/ks.cfg
5)
vim  /var/lib/tftpboot/pxelinux.cfg/default
default vesamenu.c32
timeout 600                        ##等待时间

display boot.msg

# Clear the screen when exiting the menu, instead of leaving the menu displayed.
# For vesamenu, this means the graphical background is still displayed without
# the menu itself for as long as the screen remains in graphics mode.
menu clear
menu background splash.png
menu title Red Hat Enterprise Linux 7.0            ##大标题

label linux
  menu label ^Install Red Hat Enterprise Linux 7.0            ##小标题
   menu default                                                                 ##默认标题设定
  kernel vmlinuz
  append initrd=initrd.img repo=http://172.25.254.100/soucre ks=http://172.25.254.100/ks.cfg    ##安装源和ks

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值