搭建PXE网络安装环境实现服务器自动部署
创始人
2024-11-04 03:36:38
0

[root@nginx xc]# yum search pxelinux

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
              : manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

============================== Matched: pxelinux ===============================
syslinux.x86_64 : Simple kernel loader which boots from a FAT filesystem
syslinux-extlinux.x86_64 : The EXTLINUX bootloader, for booting the local
                         : system.
syslinux-tftpboot.noarch : SYSLINUX modules in /var/lib/tftpboot, available for
                         : network booting
[root@nginx xc]# yum install syslinux.x86_64 

安装tftp服务 用来共享pxelinux.0数据文件的网络服务
[root@nginx xc]# yum search tftp
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
              : manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

============================== N/S matched: tftp ===============================
syslinux-tftpboot.noarch : SYSLINUX modules in /var/lib/tftpboot, available for
                         : network booting
tftp.x86_64 : The client for the Trivial File Transfer Protocol (TFTP)
tftp-server.x86_64 : The server for the Trivial File Transfer Protocol (TFTP)

[root@nginx xc]# yum install tftp-server.x86_64 -y
[root@nginx xc]# systemctl enable --now tftp  --启动tftp
[root@nginx xc]# rpm -ql tftp-server 
/etc/xinetd.d/tftp
/usr/lib/systemd/system/tftp.service
/usr/lib/systemd/system/tftp.socket
/usr/sbin/in.tftpd
/usr/share/doc/tftp-server-5.2
/usr/share/doc/tftp-server-5.2/CHANGES
/usr/share/doc/tftp-server-5.2/README
/usr/share/doc/tftp-server-5.2/README.security
/usr/share/man/man8/in.tftpd.8.gz
/usr/share/man/man8/tftpd.8.gz
/var/lib/tftpboot                #tftp存放数据的目录

[root@nginx xc]# cp /rhel7/isolinux/* /var/lib/tftpboot/  
[root@nginx xc]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/   -拷贝资源到该数据目录
[root@nginx xc]# cd /var/lib/tftpboot/
[root@nginx tftpboot]# mkdir pxelinux.cfg
[root@nginx tftpboot]# cp isolinux.cfg pxelinux.cfg/default -拷贝安装显示界面
[root@nginx ~]# vim /etc/dhcp/dhcpd.conf 
添加两行
 next-server 172.25.254.100;
 filename "pxelinux.0";
[root@nginx ~]# systemctl restart dhcpd

设置资源地址以及默认选择下载第一个

[root@nginx ~]# vim /var/lib/tftpboot/pxelinux.cfg/default 

label linux
  menu label ^Install Red Hat Enterprise Linux xcxcxcxc
  menu default      ----设置开机默认选择第一条安装
  kernel vmlinuz
  append initrd=initrd.img repo=http://172.25.254.100/rhel7 ks=http://172.25.254.100/ks.cfg  quiet
#以上IP写启动了http和编写kickstart脚本的服务器

测试 找到bios模式

 首先选择网卡模式安装

保存


 

然后进入安装界面回车就行,安装完了记得再次进入bios模式修改启动方式为硬盘安装  

 

再次启动到达此界面就欧克了

 

相关内容

热门资讯

技巧辅助挂!pokermast... 技巧辅助挂!pokermaster修改器,丹东约战麻将辅助器,演示教程(有挂细节)1、点击下载安装,...
现场直击!wepokerplu... 现场直击!wepokerplus万能挂,丰城双剑新版最强高分攻略,操作教程(有挂方针)1.丰城双剑新...
插件辅助挂!wepoker有辅... 插件辅助挂!wepoker有辅助器吗,乐平包王攻略,学习教程(有挂方略)1、首先打开乐平包王攻略辅助...
据玩家消息!拱趴大菠萝辅助神器... 据玩家消息!拱趴大菠萝辅助神器,多乐跑得快辅助器,机巧教程(证实有挂)1、在拱趴大菠萝辅助神器插件功...
此事备受玩家关注!来玩app破... 此事备受玩家关注!来玩app破解版,h5能反杀吗,绝活教程(有挂详细)1、打开软件启动之后找到中间准...
值得注意的是!aapoker破... 值得注意的是!aapoker破解侠是真的吗,蜀山四川游戏修改工具,经验教程(有挂助手)1、金币登录送...
第三方辅助!wepoker脚本... 第三方辅助!wepoker脚本,广东星悦有外开挂辅助器吗,法门教程(有挂分析)广东星悦有外开挂辅助器...
此事引发广泛关注!德州透视脚本... 此事引发广泛关注!德州透视脚本,崇阳斗棋辅助脚本视频,诀窍教程(的确有挂)暗藏猫腻,小编详细说明崇阳...
黑科技辅助挂!wepoker买... 黑科技辅助挂!wepoker买脚本靠谱吗,情怀七喜游戏辅助,法门教程(有挂方法)1、每一步都需要思考...
方法辅助挂!aapoker怎么... 方法辅助挂!aapoker怎么设置提高好牌几率,蘑菇云辅助使用视频,绝活儿教程(讲解有挂)1、完成蘑...