系统部署后初始化

通用配置

设置上海时区

timedatectl set-timezone Asia/Shanghai

使用 24 小时制显示时间

echo "LC_TIME=en_DK.UTF-8" >> /etc/default/locale

CentOS / RHEL 系列

关闭 SELinux

setenforce 0
sed -ri 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config

关闭 firewalld

systemctl disable --now firewalld

Ubuntu / Debian 系列

关闭自动更新

sudo sed -i 's/"1"/"0"/g' /etc/apt/apt.conf.d/20auto-upgrades 2>/dev/null
sudo systemctl disable --now apt-daily.timer apt-daily-upgrade.timer