server-management by claudiodearaujo/izacenter
npx skills add https://github.com/claudiodearaujo/izacenter --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 用户 |
| 忽略日志 | 设置日志轮转 |
| 跳过监控 | 从第一天起就进行监控 |
| 手动重启 | 配置自动重启 |
| 不做备份 | 制定定期备份计划 |
记住: 一个管理良好的服务器是枯燥的。这正是目标。
每周安装数
1
代码仓库
GitHub 星标数
1
首次出现
今天
安全审计
安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
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.
Weekly Installs
1
Repository
GitHub Stars
1
First Seen
Today
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
79,900 周安装