Anolis OS 首小时基线:装完系统后的 12 步核对
12 步基线在两台 23.5 实机(手动安装 / kickstart 安装)各执行一遍(2026-11-06,12 步 run.json 双份)。适用 23 线;8 线差异点(双内核、EPEL 默认启用)随文标注。
基线清单(12 步,命令 + 判定)
Section titled “基线清单(12 步,命令 + 判定)”# 1 发行版身份与内核线cat /etc/os-release | grep PRETTY # Anolis OS 23.5uname -r # -an23 = ANCK;记录进基线rpm -q anolis-release # anolis-release-23.5-15.an23(实测)
# 2 虚拟化环境确认systemd-detect-virt --vm # kvm(云上多为 kvm)
# 3 源连通(23 线 os 仓库)curl -s -o /dev/null -w '%{http_code}\n' -m 15 \ https://mirrors.openanolis.cn/anolis/23/os/x86_64/os/repodata/repomd.xml # 200
# 4 时钟同步timedatectl | grep synchronized # yes(NTP 已同步)
# 5 SELinux 决策(Anolis 特有:默认不是 enforcing)getenforce # 装机=Permissive;云镜像=Disabledgrep ^SELINUX /etc/selinux/config# 决策:上生产要么改 enforcing 并验证策略,要么书面记录 permissive 的原因
# 6 防火墙systemctl is-active firewalld # 装机=active;云镜像=inactivefirewall-cmd --list-all # 放行清单按需收紧
# 7 仓库dnf repolist # os + updates(实测双仓)
# 8 元数据刷新sudo dnf -y makecache # 实测秒级(源健康)
# 9 更新检查(退出码语义:0=无更新,100=有更新)sudo dnf -q check-update; echo "exit=$?"
# 10 内核包清单rpm -q kernel # 当前内核包;升级进内核管理页
# 11 基线工具for c in curl wget vim tar chronyc; do command -v $c || echo "$c absent"; done
# 12 主机名与时区hostnamectl # 与 CMDB/编排系统一致两个 Anolis 特有决策点
Section titled “两个 Anolis 特有决策点”- SELinux:装机默认 permissive、云镜像默认 Disabled——都不是 enforcing。上线前要么启用 enforcing(配策略),要么在基线表里写明豁免原因,别留成「没看过」。
- 内核版本记录:装机内核随安装时刻漂移(实测同日两台相差一个小版本),基线表必须含
uname -r;8 线还要记录 ANCK/RHCK 线(uname 后缀 -an8 vs -el8)。
与其他发行版首小时的差异
Section titled “与其他发行版首小时的差异”| 步骤 | Anolis 23 | Alma/Rocky 10 |
|---|---|---|
| SELinux 默认 | permissive(装机)/Disabled(云) | Enforcing |
| firewalld 默认 | active(装机)/inactive(云) | active |
| 内核线 | ANCK 唯一(6.6) | RHEL 内核(6.12) |
| 仓库 | os + updates | appstream/baseos/crb/extras |