yum update -y
yum install bash-completion net-tools chrony lrzsz -y
在/etc/default/grub
中 GRUB_CMDLINE_LINUX 值中添加 ipv6.disable=1 net.ifnames=0 biosdevname=0
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/centos/grub2/grub.cfg
yum remove NetworkManager* -y
yum remove postfix -y
yum remove aic94xx-firmware-30-6.el7.noarch -y
yum remove iwl2000-firmware-18.168.6.1-80.el7_9.noarch -y
yum remove iwl6050-firmware-41.28.5.1-80.el7_9.noarch -y
yum remove iwl3945-firmware-15.32.2.9-80.el7_9.noarch -y
yum remove iwl105-firmware-18.168.6.1-80.el7_9.noarch -y
yum remove iwl4965-firmware-228.61.2.24-80.el7_9.noarch -y
yum remove iwl6000g2b-firmware-18.168.6.1-80.el7_9.noarch -y
yum remove iwl100-firmware-39.31.5.1-80.el7_9.noarch -y
yum remove iwl3160-firmware-25.30.13.0-80.el7_9.noarch -y
yum remove alsa-tools-firmware-1.1.0-1.el7.x86_64 -y
yum remove ivtv-firmware-20080701-26.el7.noarch -y
yum remove linux-firmware-20200421-80.git78c0348.el7_9.noarch -y
yum remove iwl2030-firmware-18.168.6.1-80.el7_9.noarch -y
yum remove iwl135-firmware-18.168.6.1-80.el7_9.noarch -y
yum remove iwl7260-firmware-25.30.13.0-80.el7_9.noarch -y
yum remove iwl6000g2a-firmware-18.168.6.1-80.el7_9.noarch -y
yum remove iwl1000-firmware-39.31.5.1-80.el7_9.noarch -y
yum remove iwl5000-firmware-8.83.5.1_1-80.el7_9.noarch -y
yum remove iwl5150-firmware-8.24.2.2-80.el7_9.noarch -y
yum remove iwl6000-firmware-9.221.4.1-80.el7_9.noarch -y
yum remove alsa-firmware-1.0.28-2.el7.noarch -y
yum remove centos-logos-70.0.6-3.el7.centos.noarch -y
yum remove mariadb-libs-5.5.68-1.el7.x86_64 -y
systemctl start chronyd.service
systemctl enable chronyd.service
chronyc -a makestep
cat >> /etc/virc << EOF
set tabstop=4
set shiftwidth=4
set expandtab
syntax on
set nu
EOF
mv /usr/lib/systemd/system/ctrl-alt-del.target /usr/lib/systemd/system/ctrl-alt-del.target.bak
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0
systemctl stop firewalld
systemctl disable firewalld
echo "">/var/log/wtmp && echo "">~/.bash_history && rm -rf /etc/ssh/ssh_host_* && history -c && shutdown -h now
swapoff -a
sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6=1" >> /etc/sysctl.conf
sysctl -p