Auto-sync: 2026-04-22 04:02

This commit is contained in:
2026-04-22 04:03:04 +08:00
parent 24218550d2
commit de096f2f88
232 changed files with 16604 additions and 514 deletions

View File

@@ -0,0 +1,98 @@
# Mac Mini M4
> Apple Silicon Mac Mini M4配备 Apple M4 芯片,作为家庭服务器运行各类服务。
## Overview
Mac Mini M4 是 Apple 2024 年推出的迷你台式机,搭载 Apple M4 芯片,采用 ARM64 架构。作为 Home Server它运行 FRP 客户端、N8n 工作流引擎、OpenClaw AI Agent 等服务。
## Hardware Specifications
| 规格 | Mac Mini M4 |
|------|-------------|
| 芯片 | Apple M410核CPU/10核GPU|
| 内存 | 可选 16GB/24GB/32GB 统一内存 |
| 存储 | 可选 256GB-2TB SSD |
| 架构 | ARM64Apple Silicon|
| 尺寸 | 5cm × 12.7cm × 12.7cm |
| 功耗 | 约 30-150W根据负载|
## Home Server Use Cases
### Core Services
| 服务 | 用途 | 端口 |
|------|------|------|
| FRP 客户端 | 内网穿透,远程访问 | frpc → VPS:7000 |
| N8n | 工作流自动化 | 5678 |
| OpenClaw | AI Agent | 8080 |
| Hermes Agent | 个人 AI 助手 | Telegram Bot |
### macOS-Specific Considerations
1. **ARM64 架构**:必须下载 ARM64 版本的软件(如 `frp_0.65.0_darwin_arm64.tar.gz`
2. **Gatekeeper**:需使用 `xattr -rd com.apple.quarantine` 解除安全限制
3. **launchd**:使用 launchd + launchctl 管理服务开机自启
4. **`/opt` 目录**:需要手动创建并授权
5. **Homebrew**macOS 包管理器,安装开发工具
## Installation Paths
```
/opt/ # 第三方软件安装目录(需手动创建)
├── frp/
│ ├── frp_0.65.0_darwin_arm64/
│ └── current -> frp_0.65.0_darwin_arm64/
└── n8n/
└── data/
~/Library/LaunchAgents/ # 用户级服务配置
├── com.frpc.client.plist
└── com.n8n.service.plist
```
## Advantages as Home Server
| 优势 | 说明 |
|------|------|
| 低功耗 | 空闲时仅 ~3W负载时 ~150W |
| 无噪音 | 无风扇设计(被动散热)|
| 高性能 | M4 芯片性能远超同功耗 x86 |
| macOS 生态 | 原生支持 iOS/macOS 开发 |
| ARM64 效率 | 统一内存架构,高效处理 |
| 小巧便携 | 12.7cm × 12.7cm × 5cm |
## Remote Access Architecture
```
[用户/客户端]
│ 公网SSH 6000端口
[VPS: 192.227.222.142]
│ FRP 隧道
[Mac Mini M4]
frpc ←── 连接到 VPS:7000
SSH:22 ← 远程访问
N8n:5678
OpenClaw:8080
```
## Process Management
| 方法 | 适用场景 | 命令 |
|------|----------|------|
| launchd | 开机自启(生产环境)| launchctl load/start/stop |
| tmux | 开发调试 | tmux new -s / attach |
| nohup | 简单后台 | nohup ./program & |
## Related Concepts
- [[frp]] — 内网穿透工具
- [[launchd]] — macOS 服务管理器
- [[Gatekeeper]] — macOS 安全机制
- [[软链接策略]] — 版本管理策略
- [[内网穿透]] — 远程访问机制
## Related Entities
- [[VPS]] — 内网穿透的公网中转站
- [[frps]] — FRP 服务端
## References
- Apple: Mac Mini
- Apple Silicon: ARM64 Architecture