Files
xxxig/README.md
T
wangdefaandClaude Opus 4.8 491c9e0bc3
Build and Release / release (push) Successful in 12s
Build and Release / build-and-test (amd64) (push) Successful in 1m27s
Build and Release / build-and-test (arm64) (push) Successful in 4m5s
统一 musl 全静态构建,规范 Dockerfile 与产物命名
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 10:12:08 +08:00

82 lines
3.2 KiB
Markdown
Raw Permalink 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.
# XXXig
XXXig 是 [XMRig](https://github.com/xmrig/xmrig) 的定制构建——带 CCCentral Control 集中管理)功能的 RandomX CPU 挖矿软件套件。
**本仓库只包含构建与打包基础设施**,不含矿机源码:二进制在 CI 中从上游源码仓库 `github.com/wangdefaa/xxxig` 编译,再打包分发到 [gitea.bcde.io](https://gitea.bcde.io) 的 Generic / Debian 包仓库。
## 产物
每次构建产出三个可执行文件(CPU-onlymusl 全静态,含 libuv/OpenSSL/hwloc,无外部动态库依赖,任意 Linux 发行版可跑):
| 二进制 | 作用 |
|---|---|
| `xxxig` | 实际挖矿程序,由 daemon 拉起 |
| `xxxigDaemon` | 守护进程,控制矿机并通过 cc-client 连接中心服务器;安装后作为主服务运行 |
| `xxxigServer` | 中心控制服务器,带 Web UI |
支持架构 `amd64` / `arm64`musl 全静态,任意 Linux 发行版(Debian/Ubuntu/Alpine/CentOS 等)开箱即跑。
## 安装
完整参数、服务管理、故障排查见 [script/README.md](script/README.md)。
```bash
# tar.gz(通用:Alpine / Ubuntu / Debian
sudo bash <(wget --no-check-certificate -qO- 'https://gitea.bcde.io/wangdefa/xxxig/raw/branch/main/script/install.sh') \
-o pool.example.com:3333 \
-w YOUR_WALLET
# APTDebian / Ubuntu
sudo bash <(wget --no-check-certificate -qO- 'https://gitea.bcde.io/wangdefa/xxxig/raw/branch/main/script/install.deb.sh') \
-o pool.example.com:3333 \
-w YOUR_WALLET
# 卸载(自动识别安装方式)
sudo bash <(wget --no-check-certificate -qO- 'https://gitea.bcde.io/wangdefa/xxxig/raw/branch/main/script/uninstall.sh')
```
两种渠道的安装布局不同:
| | tar.gz | .deb / APT |
|---|---|---|
| 来源 | Generic Package Registry | Debian Package Registry |
| 二进制 | `/etc/miner/xxxig/` | `/opt/xxxig/` |
| 配置 | `/etc/miner/xxxig/config.json` | `/etc/xxxig/config.json``config_cc.json` |
| 服务 | 单个 `xxxig` | `xxxig-daemon` + `xxxig-server` |
## 构建与发布
CI 定义于 [.gitea/workflows/ci.yaml](.gitea/workflows/ci.yaml)
- **push 到 `main`/`develop`**:矩阵 `arch=[amd64,arm64]`,在原生 runner 上用 Dockermusl 全静态)编译为 tar.gz 并打 `.deb`
- **打 tag**:产物上传到 Generic / Debian 包仓库并创建 Release。
本地构建:
```bash
# 编译某架构/发行版二进制(输出到 ./output/linux_<arch>/
docker buildx build --platform linux/amd64 \
--build-arg XXXIG_VERSION=v6.26.0 \
--output type=local,dest=./output \
-f docker/Dockerfile .
# 用产物 tar.gz 打 .deb
./debian/build-deb.sh amd64 6.26.0 xxxig-amd64-linux-static-6.26.0.tar.gz
```
## 版本号约定
- **上游源码 git tag** 带 `v`(如 `v6.26.0`),CI 用 `XXXIG_VERSION=v${PACKAGE_VERSION}` 检出。
- **包版本**tar.gz / deb / registry 路径)一律用数字(如 `6.26.0`),符合 Debian 版本规范。
发版只需改 ci.yaml 的 `PACKAGE_VERSION`
## 目录结构
```
.gitea/workflows/ CI 流水线
docker/ Dockerfilemusl 全静态,从上游源码编译)
debian/ .deb 打包:control 模板、维护脚本、systemd 服务
script/ 安装/卸载脚本 + 详细文档
```