操作系统要求
边缘节点支持主流的 Linux 和 Windows 操作系统。
支持的操作系统
Linux 发行版
✅ 推荐系统:
| 系统 | 版本 | 说明 |
|---|---|---|
| Ubuntu | 20.04 LTS / 22.04 LTS | 最佳支持,推荐使用 |
| Debian | 10 / 11 / 12 | 稳定可靠 |
| CentOS | 7 / 8 | 企业级选择 |
| Rocky Linux | 8 / 9 | CentOS 替代方案 |
✅ 支持系统:
- Fedora 35+
- openSUSE Leap 15+
- Arch Linux(滚动更新)
❌ 不支持系统:
- CentOS 6 及更早版本
- Ubuntu 18.04 及更早版本
- 32 位系统
Windows 系统
✅ 支持版本:
| 系统 | 版本 | 说明 |
|---|---|---|
| Windows Server | 2019 / 2022 | 服务器推荐 |
| Windows 10 | 专业版 / 企业版 | 桌面系统 |
| Windows 11 | 专业版 / 企业版 | 最新系统 |
❌ 不支持版本:
- Windows 7 / 8 / 8.1
- Windows Server 2016 及更早版本
- Windows 家庭版
系统要求
内核版本
Linux:
- 最低:3.10
- 推荐:4.15+
- 最佳:5.4+
检查内核版本:
bash
uname -r系统架构
支持的 CPU 架构:
- ✅ x86_64 (amd64)
- ✅ ARM64 (aarch64)
- ❌ 32 位系统(不支持)
检查系统架构:
bash
uname -m必需的系统组件
Linux:
bash
# 检查是否安装必需组件
which curl wget tar gzip
# Ubuntu/Debian 安装
sudo apt update
sudo apt install curl wget tar gzip
# CentOS/Rocky 安装
sudo yum install curl wget tar gzipWindows:
- .NET Framework 4.8+
- Visual C++ Redistributable 2019+
系统配置
文件描述符限制
Linux 系统需要提高文件描述符限制:
bash
# 查看当前限制
ulimit -n
# 临时提高限制
ulimit -n 65535
# 永久提高限制
sudo tee -a /etc/security/limits.conf <<EOF
* soft nofile 65535
* hard nofile 65535
EOF时间同步
确保系统时间准确:
Linux:
bash
# 安装 NTP
sudo apt install ntp # Ubuntu/Debian
sudo yum install ntp # CentOS/Rocky
# 启动 NTP 服务
sudo systemctl enable ntp
sudo systemctl start ntp
# 检查时间同步状态
timedatectl statusWindows:
powershell
# 启用时间同步
w32tm /config /manualpeerlist:"time.windows.com" /syncfromflags:manual /reliable:YES /update
net stop w32time
net start w32time
# 强制同步
w32tm /resyncSELinux / AppArmor
SELinux(CentOS/Rocky):
bash
# 查看状态
getenforce
# 临时关闭(重启后恢复)
sudo setenforce 0
# 永久关闭(不推荐)
sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/configAppArmor(Ubuntu/Debian):
bash
# 查看状态
sudo aa-status
# 如果遇到权限问题,可以临时关闭
sudo systemctl stop apparmor
sudo systemctl disable apparmorSwap 配置
建议配置 Swap 以防止内存不足:
bash
# 查看 Swap 状态
free -h
# 创建 4GB Swap 文件
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# 永久启用
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab虚拟化支持
支持的虚拟化平台
✅ 完全支持:
- VMware ESXi
- KVM / QEMU
- Hyper-V
- Proxmox VE
- VirtualBox
✅ 云平台:
- 阿里云 ECS
- 腾讯云 CVM
- AWS EC2
- Azure VM
- Google Cloud Compute Engine
⚠️ 部分支持:
- Docker 容器(需要特权模式)
- LXC / LXD 容器
❌ 不支持:
- OpenVZ 容器(内核限制)
虚拟化检查
检查是否在虚拟机中运行:
bash
# Linux
sudo dmidecode -s system-manufacturer
sudo virt-what
# 或使用
systemd-detect-virt系统优化
网络参数优化
bash
# 编辑 /etc/sysctl.conf
sudo tee -a /etc/sysctl.conf <<EOF
# 网络优化
net.core.rmem_max = 134217728
net.core.wmem_max = 134217728
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = fq
# 连接数优化
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.tcp_max_syn_backlog = 8192
net.core.somaxconn = 8192
EOF
# 应用配置
sudo sysctl -p磁盘 I/O 优化
bash
# 查看磁盘调度器
cat /sys/block/sda/queue/scheduler
# 设置为 deadline(SSD 推荐 noop)
echo deadline | sudo tee /sys/block/sda/queue/scheduler
# 永久设置
sudo tee /etc/udev/rules.d/60-scheduler.rules <<EOF
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/scheduler}="deadline"
EOF安全加固
防火墙配置
参考网络环境要求配置防火墙。
SSH 安全
bash
# 编辑 SSH 配置
sudo nano /etc/ssh/sshd_config
# 推荐配置
Port 22
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
# 重启 SSH 服务
sudo systemctl restart sshd自动更新
Ubuntu/Debian:
bash
# 安装自动更新
sudo apt install unattended-upgrades
# 启用自动更新
sudo dpkg-reconfigure -plow unattended-upgradesCentOS/Rocky:
bash
# 安装自动更新
sudo yum install yum-cron
# 启用自动更新
sudo systemctl enable yum-cron
sudo systemctl start yum-cron系统检查脚本
使用以下脚本检查系统是否满足要求:
bash
#!/bin/bash
echo "=== 系统信息检查 ==="
echo "操作系统: $(cat /etc/os-release | grep PRETTY_NAME | cut -d'"' -f2)"
echo "内核版本: $(uname -r)"
echo "系统架构: $(uname -m)"
echo ""
echo "=== 资源检查 ==="
echo "CPU 核心数: $(nproc)"
echo "内存大小: $(free -h | grep Mem | awk '{print $2}')"
echo "磁盘空间: $(df -h / | tail -1 | awk '{print $4}')"
echo ""
echo "=== 网络检查 ==="
echo "公网 IP: $(curl -s ifconfig.me)"
echo "DNS 解析: $(nslookup api.yunwawa.cloud | grep Address | tail -1)"
echo ""
echo "=== 端口检查 ==="
for port in 80 443 8080 9000; do
if netstat -tuln | grep -q ":$port "; then
echo "端口 $port: 已占用"
else
echo "端口 $port: 可用"
fi
done