14 Linux中无人职守安装脚本kickstart

Linux中无人职守安装脚本kickstart

##kickstart作用:
用文件来记录所有安装过程中问题的答案,并让所有需要安装的主机自动读取

##步骤:

  1. dnf install httpd
  2. systemctl enable --now httpd
    systemctl disable --now firewalld
  3. setenforce 0
  4. mkdir /var/www/html/lcf
  5. cp /root/anaconda-ks.cfg /var/www/html/lcf
  6. mount /isos/rhel-8.2-x86_64-dvd.iso /var/www/html/lcf/westos.cfg
  7. vim /var/www/html/lcf/anaconda-ks.cfg
#version=RHEL8
#ignoredisk --only-use=sda
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Reboot after installation
reboot
# Use graphical install
text
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8 --addsupport=zh_CN.UTF-8

# Network information
network  --onboot=on --bootproto=dhcp
repo --name="AppStream" --baseurl=http://172.25.254.250/rhel8.2/AppStream
# Use network installation
url --url="http://172.25.254.250/rhel8.2"
# Root password
rootpw --iscrypted $6$JdeJQBGpQu8K4AAR$LkkcxoIN.bhKg.qS/p1x19EFwsMkqpGPHBIrJQd6DQu6NkHMrGbN2PZsIHhyou3.3G9sDFvuCT3glYkfKZSjN/
# X Window System configuration information
#xconfig  --startxonboot
firstboot --disable
# System services
#services --enabled="chronyd"
# System timezone
timezone Asia/Shanghai
# Disk partitioning information
part swap --fstype="swap" --size=500
part /boot --fstype="xfs" --size=500
part / --fstype="xfs" --size=1 --grow


%post
touch  /mnt/westos
%end

%packages
@base
%end
  1. chmod 644 westos.cfg
  2. vim /root/Desktop/lcf1.sh

在这里插入图片描述

  1. sh /root/Desktop/lcf1.sh lcf
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lll_cf

喜欢

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值