初始化配置
1.软件更新
软件库管理
2. 配置时间
# debian
apt install -y systemd-timesyncd
# almalinux
# systemd 是默认安装且无法卸载的核心基础包
# 设置时区
timedatectl set-timezone Asia/Shanghai
# 启动NTP服务
timedatectl set-ntp true
; debian
; /etc/systemd/timesyncd.conf
[Time]
NTP=ntp.ntsc.ac.cn
FallbackNTP=ntp.aliyun.com ntp.tencent.com 0.cn.pool.ntp.org
# debian
# 在LXC、Docker 或某些 VPS 环境中
dpkg-reconfigure tzdata
3. 关闭邮件服务
systemctl stop 'postfix@*' ; systemctl disable 'postfix@\x2a' ;
# debian
apt purge -y postfix
# almalinux
dnf remove -y postfix
4. 配置网络
4.1 配置有线
AlmaLinux
NetworkManager 配置网络