2-7.Linux中的无人职守安装脚本kickstart

安装虚拟机脚本

实验环境    1.火墙 selinux关闭 setenforce 0
                    2.配置软件仓库能正常使用
                    3.httpd服务开启


    vim /root/anaconda-ks.cfg(按如下更改)
    openssl    passwd -6    设置密码加密字符

把加密字符写入/root/anaconda-ks.cfg 
    cp /root/anaconda-ks.cfg  /var/www/html/westos.ks
    chmod 644 /var/www/html/westos.ks

#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
#graphical
text
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8 --addsupport=zh_CN.UTF-8
 
# Network information
network  --bootproto=dhcp --onboot=on
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$hKx3uiCepklshu3r$yGUk4WtNzGdQsQhY71TCaW0tmABnQw9CtK8IbMH54cIDguvUAu5BaW9KwnPxWQ51mkQ1hK13fX/mwYVNHdWZW/
# X Window System configuration information
xconfig  --startxonboot
firstboot --disable
# System services
services --enabled="chronyd"
# System timezone
timezone Asia/Shanghai
# Disk partitioning information
part / --fstype="xfs" --size=1 --grow
part /boot --fstype="xfs" --size=500
part swap --fstype="swap" --size=500
 
%packages
@^graphical-server-environment
ibus-libpinyin.x86_64
 
%end

virt-manager
    添加虚拟机

       设定完硬盘内存大小虚拟机名字后

Troubleshooting+Tab 

ks=http://172.25.254.39/westos.ks

安装完成

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值