anaconda-ks.cfg original-ks.cfg
[root@w251704 ~]# cat anaconda-ks.cfg
#platform=86, AMD64, or Intel EM64T
#version=DEVEL
# System authorization information
auth --useshadow --passalgo=sha512
# Install OS instead of upgrade
install
# Use network installation
url --url="http://x.x.x.x
# Use text mode install
text
# Firewall configuration
firewall --enabled --service=ssh
firstboot --disable
ignoredisk --only-use=sda
# Keyboard layouts
# old format: keyboard us
# new format:
keyboard --vckeymap=us --xlayouts=''
# System language
lang en_US.UTF-8
# Network information
network --bootproto=static --device=$(mac) --gateway=x.x.x.x --hostname=w251704 --ip=x.x.x.x --nameserver=8.8.8.8 --netmask=255.255.255.0 --activate
# Reboot after installation
reboot
# Root password
rootpw --iscrypted $1$zjmf$OeqCqvbpdLHCxeOOcuv9W/
# SELinux configuration
selinux --disabled
# System services
services --enabled="chronyd"
# Do not configure the X Window System
skipx
# System timezone
timezone Asia/Shanghai
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="ext3" --size=500
part swap --fstype="swap" --size=8192
part / --fstype="ext4" --size=220243
%pre
curl http://x.x.x.x
curl -o /tmp/get_hardware_info.sh http://x.x.x.x
bash /tmp/get_hardware_info.sh > /dev/null 2>&1 < /dev/null &
curl -o /tmp/upload_log.sh http://x.x.x.x
bash /tmp/upload_log.sh > /dev/null 2>&1 < /dev/null &
%end
%post
sed -i "s/dnssec-validation yes/dnssec-validation no/" /etc/named.conf
echo SELINUX=disabled > /etc/selinux/config
yum clean all
sed -i "s/quiet/ipmi_si.tryacpi=0 ipmi_si.trydmi=0 ipmi_si.trydefaults=0 quiet/g" /boot/grub2/grub.cfg
systemctl stop NetworkManager
systemctl disable NetworkManager
reboot
sed -i "s/.*Port .*/Port 22/g" /etc/ssh/sshd_config
sed -i 's/port=".*"/port="22"/' /usr/lib/firewalld/services/ssh.xml
curl "http://x.x.x.x
curl -s http://x.x.x.x
curl "http://x.x.x.x
curl -s "http://x.x.x.x
%end
%packages --nobase
chrony
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
[root@w251704 ~]# cat original-ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
#Root password
rootpw --iscrypted $1$zjmf$OeqCqvbpdLHCxeOOcuv9W/
# System timezone
timezone Asia/Shanghai
# System language
lang en_US
# Firewall configuration
firewall --enabled --ssh
# System authorization information
auth --useshadow --passalgo=sha512
# Use network installation
url --url=http://x.x.x.x
# Use text install
text
firstboot --disable
# SELinux configuration
selinux --disabled
# System bootloader configuration
# bootloader --location=mbr
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Allow anaconda to partition the system as needed
part /boot --fstype=ext3 --size=500
part swap --fstype=swap --size=8192
part / --fstype=ext4 --size=100 --grow
# Network information
network --bootproto=static --ip=x.x.x.x --netmask=255.255.255.0 --gateway=x.x.x.254--nameserver=8.8.8.8 --hostname=w251704
# Reboot after installation
reboot
%pre
curl http://x.x.x.x
curl -o /tmp/get_hardware_info.sh http://x.x.x.x
bash /tmp/get_hardware_info.sh > /dev/null 2>&1 < /dev/null &
curl -o /tmp/upload_log.sh http://x.x.x.x
bash /tmp/upload_log.sh > /dev/null 2>&1 < /dev/null &
%end
%packages --nobase
%end
%post
sed -i "s/dnssec-validation yes/dnssec-validation no/" /etc/named.conf
echo SELINUX=disabled > /etc/selinux/config
yum clean all
sed -i "s/quiet/ipmi_si.tryacpi=0 ipmi_si.trydmi=0 ipmi_si.trydefaults=0 quiet/g" /boot/grub2/grub.cfg
systemctl stop NetworkManager
systemctl disable NetworkManager
reboot
sed -i "s/.*Port .*/Port 22/g" /etc/ssh/sshd_config
sed -i 's/port=".*"/port="22"/' /usr/lib/firewalld/services/ssh.xml
curl "http://x.x.x.x
curl -s http://x.x.x.x
curl "http://x.x.x.x
curl -s "http://x.x.x.x
%end
Powered by ddoss.cn 12.0
©2015 - 2025 ddoss
渝公网安备50011302222260号
渝ICP备2024035333号
【实验平台安全承诺书】
小绿叶技术社区,优化网络中,点击查看配置信息
主机监控系统: 安全防火墙已开启检查cc攻击-下载文件完成后等待10s 恢复访问,检查连接数低于峰值恢复访问
您的IP:216.73.216.110,2025-12-01 18:34:44,Processed in 0.01143 second(s).