-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
EnerOS Bot edited this page Jul 5, 2026
·
1 revision
中文 | English
维护版本:v0.51.2 | 最后更新:2026-07-06
EnerOS 提供三种部署方式:源码编译(开发/调试)、Docker Compose(推荐生产)、OS 镜像(边缘部署)。
详细部署文档见 docs/deployment.md。本页仅作摘要。
| 维度 | 最低 | 推荐 |
|---|---|---|
| OS | Linux(Ubuntu 22.04+ / Debian 12+) | Linux |
| Rust | 1.75+ | 1.85+ |
| 内存 | 512 MB | 2 GB+ |
| 磁盘 | 1 GB | 10 GB+(含时序数据) |
| 网络 | 8080(API) | + 16686(Jaeger)/ 9090(Prometheus)/ 3000(Grafana) |
git clone https://github.com/Gawg-AI/EnerOS.git
cd EnerOS
cargo build --release
# 直接运行 release 二进制
./target/release/eneros run --config eneros.tomlUbuntu/Debian 系统依赖:
sudo apt install -y build-essential pkg-config libseccomp-dev libssl-devWindows 用户:deploy/scripts/*.sh 需在 Git Bash/WSL 下运行,或直接 cargo run --package eneros-api -- run --config eneros.toml。
git clone https://github.com/Gawg-AI/EnerOS.git && cd EnerOS
# 编辑配置
cp eneros.toml eneros.toml.local
# 修改 eneros.toml.local 中的配置项...
# 启动核心服务
docker compose -f deploy/docker/docker-compose.yml up -d
# 带监控和追踪的完整部署
docker compose -f deploy/docker/docker-compose.yml --profile monitoring --profile tracing up -d
# 健康检查
curl http://localhost:8080/healthProfile 选项:
- 默认:仅核心 eneros 服务
-
--profile monitoring:+ Prometheus + Grafana -
--profile tracing:+ Jaeger UI
EnerOS 提供完整 Linux 镜像构建基础设施,位于 os/ 目录:
| 子目录 | 作用 |
|---|---|
os/boot/ |
启动配置(grub.cfg、initramfs、启动参数验证) |
os/kernel/ |
内核配置(x86_64/aarch64)+ 构建脚本 |
os/rootfs/ |
根文件系统(build.sh + /etc/eneros/*.toml) |
os/image-builder/ |
镜像构建(分区、引导装载程序安装) |
os/tests/ |
OS 启动测试(boot_test、boot_params_test) |
构建流程:
cd os/rootfs
sudo ./build.sh # 构建 rootfs tarball
cd ../image-builder
sudo ./build_image.sh --target x86_64 --output eneros.imgOTA 更新(v0.22.0+):A/B 分区原子更新 + Ed25519 签名验证 + 自动回滚。
enerosctl update apply --image eneros-v0.51.2.img --sig signature.sig详见 Deployment Guide 与 docs/deployment.md §版本管理。
EnerOS 运行时配置由 eneros.toml 定义。完整段落速查见 Configuration Reference。
# 编辑本地配置(不污染默认 eneros.toml)
cp eneros.toml eneros.toml.local
# 启动时指定配置
eneros run --config eneros.toml.local- 跑通 MVP 闭环 → First Demo
- 配置项速查 → Configuration Reference
- 完整部署文档 → docs/deployment.md
EnerOS Wiki | v0.51.2