centos7系统PXE技术高效批量网络装机

PXE高效批量网络装机

  1. 将光盘挂载到/var/ftp/centos7/
    [root@wangluoyuan ~]# mount /dev/sr0 /var/ftp/centos7/
    在这里插入图片描述

  2. 查看内存
    Df-hT
    在这里插入图片描述

3.检查yum仓库
[root@wangluoyuan ~]# yum clean all
[root@wangluoyuan ~]# yum repolist
在这里插入图片描述

4.编辑centos-Base…repo
[root@wangluoyuan ~]# vim /etc/yum.repos.d/CentOS-Base.repo
在这里插入图片描述

5.下载tftp-server
[root@wangluoyuan ~]# yum install -y tftp-server
编辑/etc/xinetd.d/tftp
[root@wangluoyuan ~]# vim /etc/xinetd.d/tftp
在这里插入图片描述

6.开启tftp复制 并设置开机自启动
[root@wangluoyuan ~]# systemctl enable tftp –now
在这里插入图片描述

7.检测是否开启
在这里插入图片描述

8.进入/var/ftp/centos7/images/pxeboot/将initrd.img vmlinuz两个文件复制到/tftpboot
[root@wangluoyuan ~]# cd /var/ftp/centos7/images/pxeboot/
[root@wangluoyuan pxeboot]# cp initrd.img vmlinuz /var/lib/tftpboot
在这里插入图片描述
在这里插入图片描述

9.下载软件syslinux获取该软件里面的一个文件(/usr/share/syslinux/pxelinux.0)并复制到/var/lib/tftpboot
[root@wangluoyuan tftpboot]# cp /usr/share/syslinux/pxelinux.0 ./
10.进入新建文件夹pxelinux.cfg 创建文件default并编辑
在这里插入图片描述

11.编辑dhcp配置文件并重启
[root@wangluoyuan pxelinux.cfg]# vim /etc/dhcp/dhcpd.conf
[root@wangluoyuan pxelinux.cfg]# systemctl restart dhcpd
在这里插入图片描述

11.开启dhcpd,vsftp,named并关闭防火墙
在这里插入图片描述

二.新建一台图形化Linux系统(注意:一定需要一台有图形化的系统)
1.下载system-config-kickstart syslinux
[root@localhost roo]# yum install -y system-config-kickstart syslinux
3. 进入自己本地yum源仓库文件cd /etc/yum.repos.d移动所有*.repo文件到back(新建文件夹中)而后将centos-cr.repo移动到yum.repos.d里。
在这里插入图片描述

  1. 编辑文件centos-cr.repo
    [root@localhost yum.repos.d]# vi CentOS-CR.repo
    在这里插入图片描述

  2. 清理缓存
    Yum clean all

  3. 重新加载
    Yum repolist
    7.system-config-kicstart (启动无人守职需要的程序软件)

在这里插入图片描述

8;依次配置
在这里插入图片描述

9: 在这里插入图片描述

10: 在这里插入图片描述

11:在这里插入图片描述

必须添加三个分区: swap /boot /
Swap:在这里插入图片描述

/boot:
在这里插入图片描述

/:
在这里插入图片描述

12:保存文件:
在这里插入图片描述

保存文件到/root目录下

13.将ks文件发送到192.168.148.129/var/ftp文件夹
[root@localhost ~]# scp ks.cfg root@192.168.148.129:/var/ftp
在这里插入图片描述
在这里插入图片描述

14.进入/var/lib/tftpboot文件夹编辑文件pxelinux.cfg
[root@wangluoyuan ~]# vim /var/lib/tftpboot/pxelinux.cfg/default
在这里插入图片描述

15.重启
[root@wangluoyuan pxelinux.cfg]# systemctl restart tftp
16.新打开一台虚拟机进行验证

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值