yum install system-config-kickstart -y	##下载软件
system-config-kickstart					##运行软件,定制系统
vim ks.cfg								##编辑软件生成文件,自定义安装包
ksvalidator ks.cfg						##检查脚本是否有语法错误
yum install httpd -y					##下载httpd
systemctl start httpd					##启动httpd
systemctl enable httpd					##设置httpd开机启动
systemctl stop firewalld				##关闭防火墙
systemctl disable firewalld				##设置防火墙开机不启动
cp ks.cfg /var/www/html/ks.cfg			##把脚本放到httpd的共享文件夹里
  1. yum install system-config-kickstart.noarch -y ##下载软件linux系统的自动安装脚本
  2. system-config-kickstart ##运行软件,定制系统linux系统的自动安装脚本
    linux系统的自动安装脚本
    linux系统的自动安装脚本
    linux系统的自动安装脚本
    linux系统的自动安装脚本
    linux系统的自动安装脚本
    linux系统的自动安装脚本
  3. vim ks.cfg ##编辑软件生成文件,自定义安装包 linux系统的自动安装脚本
  4. ksvalidator ks.cfg ##检查脚本是否有语法错误ksvalidator ks.cfg
  5. yum install httpd -y ##下载httpdyum install httpd -y
  6. systemctl start httpd ##启动httpdsystemctl start httpd
  7. systemctl enable httpd ##设置httpd开机启动
  8. systemctl stop firewalld ##关闭防火墙
  9. systemctl disable firewalld ##设置防火墙开机不启动
  10. cp ks.cfg /var/www/html/ks.cfg ##把脚本放到httpd的共享文件夹里

脚本

#!/bin/bash
virt-install \
--name $1 \
--ram 1024 \
--cpus 1 \
--disk /var/lib/libvirt/images/$1.qcow2,bus=virtio,size=9 \
--network bridge=br0,model=virtio \
--location http://172.25.254.41/rhel7.0 \
--extra-args ks=http://172.25.254.91/ks.cfg &

相关文章:

  • 2021-07-25
  • 2021-05-02
  • 2021-10-28
  • 2021-10-20
  • 2021-09-22
  • 2021-09-24
  • 2021-06-21
猜你喜欢
  • 2021-11-22
  • 2021-04-02
  • 2021-05-24
  • 2021-11-14
  • 2021-05-28
  • 2021-08-31
  • 2021-09-26
相关资源
相似解决方案