备注
- 在批量安装系统后安装服务,在kickstart应答文件中写安装命令可以实现
- 网卡需要支持PXE,参考各服务器开启PXE启动方法:
https://blog.csdn.net/qq_43152344/article/details/96443718
3. 需要(httpd/ftp/nfs)服务发布yum安装源,以及DHCP 服务和TFTP 服务
一、配置pxe服务端
1、下载centos7.6镜像:
https://vault.centos.org/7.6.1810/isos/x86_64/CentOS-7-x86_64-Everything-1810.iso
2、VMware安装虚拟机(省略)
3、先配置联网,安装如下服务
yum -y install dhcp httpd xinetd tftp-server syslinux system-config-kickstart
4、配置虚拟机网络,修改为仅主机模式,192.168.2网段
配置IP地址,192.168.2.2
5、挂载镜像文件,固化
mount /dev/cdrom /mnt
6、备份repo文件,创建pxe yum源
mkdir /etc/yum.repos.d/backup mv /etc/yum.repos.dSELINUX=permissive/g' /etc/selinux/config systemctl stop firewalld systemctl disable firewalld
15、启动服务
systemctl start xinetd httpd dhcpd tftp systemctl enable xinetd httpd dhcpd tftp systemctl status xinetd httpd dhcpd tftp
二、客户机
开启虚拟机即可自动安装 安装完成后,执行以下命令 systemctl get-default systemctl set-default graphical.target shutdown -r now



