server-management by sickn33/antigravity-awesome-skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill server-management生产环境运维的服务器管理原则。学会思考,而非死记命令。
| 场景 | 工具 |
|---|---|
| Node.js 应用 | PM2 (集群、重载) |
| 任何应用 | systemd (Linux 原生) |
| 容器 | Docker/Podman |
| 编排 | Kubernetes, Docker Swarm |
| 目标 | 含义 |
|---|---|
| 崩溃后重启 | 自动恢复 |
| 零停机重载 | 服务不中断 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 集群化 | 利用所有 CPU 核心 |
| 持久化 | 服务器重启后仍存活 |
| 类别 | 关键指标 |
|---|---|
| 可用性 | 运行时间、健康检查 |
| 性能 | 响应时间、吞吐量 |
| 错误 | 错误率、类型 |
| 资源 | CPU、内存、磁盘 |
| 级别 | 响应 |
|---|---|
| 严重 | 立即处理 |
| 警告 | 尽快调查 |
| 信息 | 每日回顾 |
| 需求 | 选项 |
|---|---|
| 简单/免费 | PM2 指标、htop |
| 完整可观测性 | Grafana, Datadog |
| 错误追踪 | Sentry |
| 运行时间 | UptimeRobot, Pingdom |
| 日志类型 | 目的 |
|---|---|
| 应用日志 | 调试、审计 |
| 访问日志 | 流量分析 |
| 错误日志 | 问题检测 |
| 现象 | 解决方案 |
|---|---|
| 高 CPU 使用率 | 增加实例 (水平扩展) |
| 高内存使用率 | 增加 RAM 或修复内存泄漏 |
| 响应缓慢 | 先分析性能,再扩缩容 |
| 流量高峰 | 自动扩缩容 |
| 类型 | 使用时机 |
|---|---|
| 垂直扩展 | 快速修复,单实例 |
| 水平扩展 | 可持续,分布式 |
| 自动扩缩容 | 流量变化时 |
| 检查项 | 含义 |
|---|---|
| HTTP 200 | 服务响应正常 |
| 数据库连接正常 | 数据可访问 |
| 依赖项正常 | 外部服务可达 |
| 资源正常 | CPU/内存未耗尽 |
| 领域 | 原则 |
|---|---|
| 访问 | 仅使用 SSH 密钥,禁用密码 |
| 防火墙 | 仅开放所需端口 |
| 更新 | 定期安装安全补丁 |
| 密钥 | 使用环境变量,而非文件 |
| 审计 | 记录访问和变更 |
当出现问题时:
| ❌ 不要 | ✅ 要做 |
|---|---|
| 以 root 身份运行 | 使用非 root 用户 |
| 忽略日志 | 设置日志轮转 |
| 跳过监控 | 从第一天开始监控 |
| 手动重启 | 配置自动重启 |
| 不做备份 | 定期备份计划 |
记住: 管理良好的服务器是平淡无奇的。这正是目标所在。
此技能适用于执行概述中描述的工作流或操作。
每周安装次数
347
代码仓库
GitHub 星标数
27.1K
首次出现
2026年1月20日
安全审计
安装于
opencode279
gemini-cli273
claude-code269
codex243
cursor241
antigravity230
Server management principles for production operations. Learn to THINK, not memorize commands.
| Scenario | Tool |
|---|---|
| Node.js app | PM2 (clustering, reload) |
| Any app | systemd (Linux native) |
| Containers | Docker/Podman |
| Orchestration | Kubernetes, Docker Swarm |
| Goal | What It Means |
|---|---|
| Restart on crash | Auto-recovery |
| Zero-downtime reload | No service interruption |
| Clustering | Use all CPU cores |
| Persistence | Survive server reboot |
| Category | Key Metrics |
|---|---|
| Availability | Uptime, health checks |
| Performance | Response time, throughput |
| Errors | Error rate, types |
| Resources | CPU, memory, disk |
| Level | Response |
|---|---|
| Critical | Immediate action |
| Warning | Investigate soon |
| Info | Review daily |
| Need | Options |
|---|---|
| Simple/Free | PM2 metrics, htop |
| Full observability | Grafana, Datadog |
| Error tracking | Sentry |
| Uptime | UptimeRobot, Pingdom |
| Log Type | Purpose |
|---|---|
| Application logs | Debug, audit |
| Access logs | Traffic analysis |
| Error logs | Issue detection |
| Symptom | Solution |
|---|---|
| High CPU | Add instances (horizontal) |
| High memory | Increase RAM or fix leak |
| Slow response | Profile first, then scale |
| Traffic spikes | Auto-scaling |
| Type | When to Use |
|---|---|
| Vertical | Quick fix, single instance |
| Horizontal | Sustainable, distributed |
| Auto | Variable traffic |
| Check | Meaning |
|---|---|
| HTTP 200 | Service responding |
| Database connected | Data accessible |
| Dependencies OK | External services reachable |
| Resources OK | CPU/memory not exhausted |
| Area | Principle |
|---|---|
| Access | SSH keys only, no passwords |
| Firewall | Only needed ports open |
| Updates | Regular security patches |
| Secrets | Environment vars, not files |
| Audit | Log access and changes |
When something's wrong:
| ❌ Don't | ✅ Do |
|---|---|
| Run as root | Use non-root user |
| Ignore logs | Set up log rotation |
| Skip monitoring | Monitor from day one |
| Manual restarts | Auto-restart config |
| No backups | Regular backup schedule |
Remember: A well-managed server is boring. That's the goal.
This skill is applicable to execute the workflow or actions described in the overview.
Weekly Installs
347
Repository
GitHub Stars
27.1K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode279
gemini-cli273
claude-code269
codex243
cursor241
antigravity230
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
68,100 周安装