Files
p2pool/llmdoc/guides/debian-package.md
Wang Defa b4a284efd1
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -12s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -5s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 0s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 9s
Build and Release / release (push) Successful in 38s
简化 CI 配置:统一使用 stable Debian 发行版
- 移除多发行版 Debian Package Registry 上传(bookworm、trixie)
- 统一上传到 stable 发行版池,简化维护和用户体验
- 更新 README 和文档系统的安装指南
- 新增 CI 工作流程概述文档
- 保持 ubuntu 和 alpine 双发行版构建支持
2025-12-25 11:05:47 +08:00

135 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Debian 包安装与配置指南
## 安装步骤
### 添加 Gitea 包仓库
```bash
# 导入 Gitea 仓库密钥
sudo curl https://GITEA_URL/api/packages/OWNER/debian/repository.key \
-o /etc/apt/keyrings/gitea-OWNER.asc
# 添加仓库源(以 Debian 12 为例)
echo "deb [signed-by=/etc/apt/keyrings/gitea-OWNER.asc] \
https://GITEA_URL/api/packages/OWNER/debian stable main" | \
sudo tee /etc/apt/sources.list.d/OWNER.list
# 更新包列表并安装
sudo apt-get update
sudo apt-get install p2pool
```
## 配置 P2Pool
### 编辑配置文件
P2Pool 使用配置文件 `/var/lib/p2pool/params.conf` 来管理所有设置。安装后会自动创建示例配置文件。
```bash
# 编辑配置文件
sudo nano /var/lib/p2pool/params.conf
```
配置文件示例:
```conf
# P2Pool Configuration File
# Monero node connection
host = 127.0.0.1
rpc-port = 18081
zmq-port = 18083
# Your Monero wallet address (REQUIRED)
wallet = YOUR_MONERO_WALLET_ADDRESS
# P2P settings
p2p = 0.0.0.0:37889
# API settings
data-api = /var/lib/p2pool/data-api
local-api = true
# Logging
log-file = /var/log/p2pool/p2pool.log
loglevel = 3
# Mining mode (uncomment to enable mini sidechain)
# mini = true
# Stratum server (for miners to connect)
# stratum = 0.0.0.0:3333
```
### 关键配置参数
- `host`Monero 节点的 IP 地址
- `rpc-port`Monero 节点的 RPC 端口
- `zmq-port`Monero 节点的 ZMQ 端口
- `wallet`**必需** - 您的 Monero 钱包地址
- `mini`:启用 mini 侧链(适合算力较小的矿工)
- `stratum`Stratum 服务器地址,供矿机连接
- `loglevel`日志级别0-63 为默认值)
### 配置文件的优势
-**版本升级安全**`params.conf``apt upgrade` 时不会被覆盖
-**易于管理**:所有配置集中在一个文件中
-**支持注释**:可以添加说明和注释
-**无需修改 systemd**:避免编辑系统服务文件
## 启动和管理服务
```bash
# 启用服务,设置开机自启
sudo systemctl enable p2pool.service
# 启动服务
sudo systemctl start p2pool.service
# 查看服务状态
sudo systemctl status p2pool.service
# 查看实时日志
sudo journalctl -u p2pool -f
```
## 目录结构
- `/opt/p2pool/p2pool`P2Pool 二进制文件
- `/var/lib/p2pool/`:数据目录
- `/var/log/p2pool/`:日志目录
## 安全建议
- 使用专用钱包地址
- 限制 Stratum 端口的网络访问
- 定期更新 p2pool 版本
## 故障排查
### 常见错误
- RPC 端口配置不正确
- 钱包地址无效
- 网络连接问题
### 检查日志
```bash
# 查看完整日志
sudo cat /var/log/p2pool/p2pool.log
# 查看最近错误
sudo journalctl -u p2pool -n 50 --no-pager
```
## 版本管理
```bash
# 查看当前版本
/opt/p2pool/p2pool --version
# 检查可用更新
sudo apt-get update
sudo apt-cache policy p2pool
```