Linux系统下安装虚拟的kickstart服务

##1.配置本地yum源##

##2.下载httpd 和 system-config-kickstart##

yum install httpd system-config-kickstart -y

##3.system-config-kickstart打开,选择配置内容##

Linux系统下安装虚拟的kickstart服务

Linux系统下安装虚拟的kickstart服务

Linux系统下安装虚拟的kickstart服务

Linux系统下安装虚拟的kickstart服务Linux系统下安装虚拟的kickstart服务

 

Linux系统下安装虚拟的kickstart服务

Linux系统下安装虚拟的kickstart服务

##5.编辑ks.cfg##

[[email protected] html]# vim ks.cfg
改时间
%packages
@base
lftp
%end

%post
cat >>/etc/yum.repos.d/yum.repo <<
[rhel7]
name=rhel7
baseurl=http://172.25.254.16/rhel7/
gpgcheck=0
EOF
%end

Linux系统下安装虚拟的kickstart服务

##6.开启服务,关火墙##

[[email protected] html]# ksvalidator ks.cfg

[[email protected] html]# systemctl start httpd
[[email protected] html]# systemctl stop firewalld
[[email protected] html]# systemctl disable firewalld
[[email protected] html]# systemctl enable httpd

Linux系统下安装虚拟的kickstart服务

##7.编写自动安装脚本##

vim /mnt/vm.sh
chmod 755 vm.sh

Linux系统下安装虚拟的kickstart服务

##8.运行脚本##

sh /mnt/vm.sh  ##运行

Linux系统下安装虚拟的kickstart服务