1.rhel7主机
[root@pxe html]# hostnamectl
Static hostname: pxe.timinglee.org
Icon name: computer-vm
Chassis: vm
Machine ID: 380f481f1fef42d7ab5705f1fca7b016
Boot ID: 26e6883ceefd4a9a9fb9a5b1cbe9db5e
Virtualization: vmware
Operating System: Red Hat Enterprise Linux Server 7.9 (Maipo)
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.9:GA:server
Kernel: Linux 3.10.0-1160.el7.x86_64
Architecture: x86-64
2.开启主机图形 # 开启图形化 init 5
3.配置网络可用
4.关闭vmware dhcp功能
#此文件是在系统安装好后自动生成的,这个文件记录了系统在安装过程中的所有设定
[root@nginx ~]# cat /root/anaconda-ks.cfg
#有图形的网络模式
[root@pxe html]# init 5
[root@pxe ~]# yum install httpd
[root@pxe ~]# systemctl enable --now httpd
[root@pxe ~]# systemctl disable --now firewalld
[root@pxe ~]# getenforce 0
disabled
# 安装图形化生成kickstart自动安装脚本的工具
[root@pxe ~]# yum install system-config-kickstart -y
# 启动图形制作工具
[root@pxe ~]# system-config-kickstart
保存
[root@pxe ~]# vim ks1.cfg
# 定位39行,添加安装软件
39 part / --fstype="xfs" --grow --maxsize=1 --size=1
40
41 %packages
42 @base
43 httpd
41 %end
# 检测语法错误
[root@pxe ~]# ksvalidator ks1.cfg
# 检测浏览器访问是否成功
[root@pxe ~]# cp /root/ks1.cfg /var/www/html/
最后创建一台新主机测试,显然测试时不成功的,因为最开始我们关闭了DHCP自动获取ip地址的功能,
接下来将怎么搭建DHCP服务分配ip地址,敬请期待下篇文章!!!