centos8 KS 文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94 [root@pxe-server ks]# cat centos8.cfg
#version=RHEL8
# License agreement
eula --agreed
# Reboot after installation
reboot
# Use graphical install
graphical
repo --name="AppStream" --baseurl=ftp://192.168.11.10/centos8/AppStream
%post
touch /home/test.txt
wget -O /etc/yum.repos.d/local.repo ftp://192.168.11.10/centos8/local.repo
wget -O /home/info.csv ftp://192.168.11.10/info.csv
wget -O /home/script.sh ftp://192.168.11.10/script.sh
wget -O /home/hosts ftp://192.168.11.10/hosts
chmod 755 /home/script.sh
chmod 755 /home/info.csv
echo "/home/script.sh" | at now + 1 minute
rm -rf /etc/yum.repos.d/C*
cat <<EOF > /etc/chrony.conf
server ntp.aliyun.com iburst
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
logdir /var/log/chrony
EOF
systemctl enable --now chronyd
%end
%packages
@^minimal-environment
chrony
vim
wget
chrony*
kexec-tools
bash-com*
at
%end
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Firewall configuration
firewall --disabled
# Network information
network --bootproto=dhcp --device=ens33 --onboot=off --ipv6=auto --no-activate
network --bootproto=dhcp --device=link --hostname=localhost.localdomain
network --bootproto=dhcp --device=ens33 --onboot=off --ipv6=auto --no-activate
network --hostname=localhost.localdomain
# Use network installation
url --url="ftp://192.168.11.10/centos8/BaseOS"
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# System bootloader configuration
bootloader --append="crashkernel=auto" --location=mbr --boot-drive=sda
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part /boot/efi --fstype="efi" --ondisk=sda --size=600 --fsoptions="defaults,uid=0,gid=0,umask=077,shortname=winnt"
part pv.122 --fstype="lvmpv" --ondisk=sda --size=100774
part /boot --fstype="xfs" --ondisk=sda --size=1024
volgroup cl --pesize=4096 pv.122
logvol / --fstype="xfs" --size=92676 --name=root --vgname=cl
logvol swap --fstype="swap" --size=8096 --name=swap --vgname=cl
# System timezone
timezone Asia/Shanghai --isUtc --nontp
# Root password
rootpw --iscrypted $6$UsuoZKrda6HN/a4X$IfVXz4xhOryBY4Qi/f4i5c0DTpDdCdaln0JIKvdCJFp7Z261SNyHiosCG8jzoF1quJkuZP9Im89Rx8YMyH9ZF/
user --groups=wheel --name=qiaolei --password=$6$68lImbTiZdzpoewx$RrszZ/mChJ3Nek7lLX28MLdoh/U3QnSYM7OzxUk.spNyG1TrWuTgdP1BAW7e8dbsuL/GFLe9u1mA6efhsvSkK/ --iscrypted --gecos="qiaolei"
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
阅读剩余
版权声明:
作者:jon
链接:https://www.linux18.cn/?p=237
文章版权归作者所有,未经允许请勿转载。
THE END