Files
xxxigcc/llmdoc/guides/how-to-configure-miner.md
Wang Defa 20935a6c89
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -11s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -4s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 1s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 10s
Build and Release / release (push) Successful in 44s
添加 llmdoc 文档系统,升级版本至 3.4.8-xg1
- 初始化 llmdoc 文档系统(overview/architecture/guides/reference)
- 创建 9 个核心文档,涵盖项目概览、安装架构、配置系统等
- 升级 CI 工作流和构建脚本版本号至 3.4.8-xg1
- 添加 .gitignore 文件
2025-12-25 09:06:01 +08:00

227 lines
3.3 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.
# 如何配置挖矿节点
本指南说明如何配置 XXXigCC 挖矿节点Daemon/Miner
## 配置文件位置
根据安装方式不同,配置文件位置如下:
- **tar.gz 安装**`/etc/miner/xxxigcc/config.json`
- **DEB 包安装**`/etc/xxxigcc/config.json`
- **手动部署**:当前目录下的 `config.json`
## 基本配置
### 1. 矿池配置
最基本的配置是设置矿池信息:
```json
{
"pools": [
{
"url": "pool.example.com:3333",
"user": "YOUR_WALLET_ADDRESS",
"pass": "x",
"tls": false,
"keepalive": true,
"nicehash": true
}
]
}
```
**参数说明:**
- `url`:矿池地址和端口
- `user`:钱包地址
- `pass`:矿池密码(通常为 "x"
- `tls`:是否启用 TLS 加密连接
- `keepalive`:保持连接活跃
- `nicehash`NiceHash 兼容模式
### 2. 算法选择
```json
{
"algo": "rx/0",
"pools": [...]
}
```
常用算法:
- `rx/0`RandomXMonero
- `cn/0`CryptoNight
### 3. CPU 配置
#### 自动配置(推荐)
```json
{
"autosave": true,
"cpu": true
}
```
#### 手动配置线程数
```json
{
"cpu": {
"enabled": true,
"max-threads-hint": 4
}
}
```
#### 高级 CPU 配置
```json
{
"cpu": {
"enabled": true,
"max-threads-hint": 75,
"rx": [0, 1, 2, 3]
}
}
```
### 4. 日志配置
```json
{
"log-file": "/var/log/xxxigcc/xxxigcc.log",
"verbose": true
}
```
## 高级配置
### 1. 大页内存1GB Pages
提高挖矿性能:
```json
{
"randomx": {
"1gb-pages": true
}
}
```
**启用前需要设置系统:**
```bash
sudo sysctl -w vm.nr_hugepages=3
```
### 2. SOLO 挖矿模式
```json
{
"pools": [
{
"url": "127.0.0.1:18081",
"daemon": true,
"self-select": "solo.example.com:3333"
}
]
}
```
### 3. 集中化管理CC配置
连接到 CC 服务器:
```json
{
"cc-client": {
"enabled": true,
"servers": [
{
"url": "http://server-ip:3344",
"access-token": "YOUR_ACCESS_TOKEN",
"use-tls": false,
"worker-id": "worker-01"
}
]
}
}
```
### 4. 捐赠设置
XXXigCC 默认捐赠级别为 0
```json
{
"donate-level": 0,
"donate-over-proxy": 0
}
```
## 完整配置示例
```json
{
"autosave": true,
"cpu": true,
"opencl": false,
"cuda": false,
"log-file": "/var/log/xxxigcc/xxxigcc.log",
"verbose": true,
"algo": "rx/0",
"pools": [
{
"url": "pool.example.com:3333",
"user": "YOUR_WALLET_ADDRESS",
"pass": "x",
"tls": false,
"keepalive": true,
"nicehash": true
}
],
"randomx": {
"1gb-pages": false
},
"cc-client": {
"enabled": false
},
"donate-level": 0
}
```
## 应用配置
修改配置后需要重启服务:
### Alpine Linux
```bash
rc-service xxxigcc restart
```
### Ubuntu/Debian (tar.gz)
```bash
systemctl restart xxxigcc
```
### Ubuntu/Debian (DEB)
```bash
systemctl restart xxxigcc-daemon
```
## 验证配置
### 检查配置文件语法
```bash
jq . /etc/xxxigcc/config.json
```
### 查看运行状态
```bash
systemctl status xxxigcc-daemon
journalctl -u xxxigcc-daemon -f
```
## 相关链接
- [配置文件参考](../reference/config-json-schema.md)
- [性能优化指南](how-to-optimize-performance.md)
- [集中化管理配置](how-to-connect-nodes-to-cc.md)