3-unit pxe

简介:

1.安装和启动服务

yum install dhcp httpd tftp-server lftp xinetd -y


systemctl restart dhcpd

systemctl start httpd

systemctl start httpd


2.修改配置文件 

##dhcp配置文件修改

vim /etc/dhcp/dhcpd.conf

wKiom1k6uxmATqKYAACDd-KKDQU800.png

wKiom1k6uxuAHRPIAABpoblt1ak579.png

31 next-server 172.25.254.62;       ##tftp主机地址 

32 filc/xinetd.d/tftp        ##pxe启动程序

wKioL1k6uxyhjozmAACxryuafXI078.png

systemctl restart  dhcpd


vim /var/lib/tftpboot

14 disable = no

systemctl restart xinetd

 

wKioL1k6uxfCk2KSAAA8wCc8pVc766.png


##复制安装所需文件

wKiom1k6uyTjkNtoAAJ9uSl6nBg944.png

wKioL1k6uynwOfIQAAFeXAHVQW4890.png

##配置自动安装文件ks.cfg并保存到/var/www/html里

wKioL1k6uzLyLNR4AAKkKvWDWdc256.png

wKiom1k6u0SC4zBjAAJ3Lf4klU4090.png


wKiom1k6uzegjQtoAAHNdsBgxco939.png

wKioL1k6uzziiefCAAGB6DfoEc8476.png


 

vim /var/lib/tftpboot/pxelinux.cfg/default

2 timeout 100     ##等待时间为10s

64   append initrd=initrd.img repo=http://172.25.254.62/rhel7.2 ks=http://172.25.254.74/ks.cfg     ##设置安装源和ks

 wKioL1k6uyvxw77jAAAwPvK4ieI075.png

wKiom1k6uyvi8eE9AACXvVS2HFY247.png


测试:

设置启动模式为网卡启动

##DHCP获取IP

wKioL1k6u0eQw7mfAAD8t3JEKqM555.png

##等待10s,开始自动安装

wKioL1k5H-qxa_V1AABG6zeUj64300.png (585×320)


本文转自cuijb0221 51CTO博客,原文链接:http://blog.51cto.com/cuijb/1933976

相关文章
|
测试技术 开发工具 数据安全/隐私保护
|
存储 开发工具
|
安全 Shell Linux