搭建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模式修改启动方式为硬盘安装  

 

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

 

相关内容

热门资讯

wepoke有挂(透视)wep... wepoke有挂(透视)wepoke真的(详细辅助2025新版总结)原来真的是有挂(可靠辅助挂)1、...
第十分钟普及!广西老友玩辅助器... 第十分钟普及!广西老友玩辅助器"详细辅助解密教程"(其实是真的有挂)1、实时广西老友玩辅助器开挂更新...
wepoke智能ai(透视)w... wepoke智能ai(透视)wopoker游戏辅助器(详细辅助可靠教程)果然真的有挂(大神有辅助挂)...
第7分钟普及!欢乐达人最新版破... 第7分钟普及!欢乐达人最新版破解版"详细辅助存在挂教程"(好像有挂)在进入欢乐达人最新版破解版辅助挂...
wepoke是真的有挂(透视)... wepoke是真的有挂(透视)wepok软件透明挂(详细辅助可靠技巧)一贯是真的有挂(可靠辅助插件)...
三分钟普及!福建兄弟十三冰修改... 三分钟普及!福建兄弟十三冰修改器"详细辅助力荐教程"(真是是有挂);1、操作简单,无需注册,只需要使...
wepoke一定有挂(透视)w... wepoke一定有挂(透视)wepokeapp下载教程(详细辅助分享教程)本来真的有挂(大神ai代打...
九分钟普及!广东麻雀有什么技巧... 九分钟普及!广东麻雀有什么技巧"详细辅助必备教程"(真是真的有挂);1、广东麻雀有什么技巧ai机器人...
wepoke ai辅助(透视)... wepoke ai辅助(透视)wepoke辅助(详细辅助揭秘教程)原来存在有挂(了解计算辅助)一、w...
第八分钟普及!大唐抓麻雀辅助&... 第八分钟普及!大唐抓麻雀辅助"详细辅助高科技教程"(真是有挂)1、完成大唐抓麻雀辅助的残局,帮助玩家...