使用手机挖矿之XMR

3周前 206次点击 来自 其他

标签: Termux

换清华源

sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list

sed -i 's@^\(deb.*games stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/game-packages-24 games stable@' $PREFIX/etc/apt/sources.list.d/game.list

sed -i 's@^\(deb.*science stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/science-packages-24 science stable@' $PREFIX/etc/apt/sources.list.d/science.list

apt update && apt upgrade

安装ubuntu

pkg install wget proot git python -y &&  git clone https://github.com/sqlsec/termux-install-linux --depth=1

cd termux-install-linux && python termux-linux-install.py

启动ubuntu

cd ~/Termux-Linux/Ubuntu && ./start-ubuntu.sh

安装xmrig

注意:我使用的时候C3Pool版本的xmrig,您也可以使用其他版本或者官方原版

apt update && apt upgrade

apt install git wget proot

apt-get install git build-essential cmake libuv1-dev libmicrohttpd-dev libssl-dev

git clone https://github.com/C3Pool/xmrig-C3 --depth=1
mv xmrig-C3 xmrig
cd xmrig
mkdir build
cd bulid
cmake -DWITH_HWLOC=OFF ..
make

修改config.json运行挖矿

编辑config.json中的字段user和pass:

{
    "api": {
        "id": null,
        "worker-id": null
    },
    "http": {
        "enabled": false,
        "host": "127.0.0.1",
        "port": 0,
        "access-token": null,
        "restricted": true
    },
    "autosave": true,
    "background": false,
    "colors": true,
    "title": true,
    "randomx": {
        "init": -1,
        "init-avx2": -1,
        "mode": "auto",
        "1gb-pages": false,
        "rdmsr": true,
        "wrmsr": true,
        "cache_qos": false,
        "numa": true,
        "scratchpad_prefetch_mode": 1
    },
    "cpu": {
        "enabled": true,
        "huge-pages": true,
        "huge-pages-jit": false,
        "hw-aes": null,
        "priority": null,
        "memory-pool": true,
        "yield": true,
        "max-threads-hint": 100,
        "asm": true,
        "argon2-impl": null,
        "astrobwt-max-size": 550,
        "cn/0": false,
        "cn-lite/0": false,
        "kawpow": false
    },
    "opencl": {
        "enabled": false,
        "cache": true,
        "loader": null,
        "platform": "AMD",
        "adl": true,
        "cn/0": false,
        "cn-lite/0": false,
        "panthera": false
    },
    "cuda": {
        "enabled": false,
        "loader": null,
        "nvml": true,
        "cn/0": false,
        "cn-lite/0": false,
        "panthera": false,
        "astrobwt": false
    },
    "donate-level": 0,
    "donate-over-proxy": 1,
    "log-file": null,
    "pools": [
        {
            "algo": null,
            "coin": null,
            "url": "mine.c3pool.com:13333",
            "user": "43ptHJUHwhi8e2grpNaXv7d8izCfrjcgbMaxBFx79AhsBwz3cT8DHgZWdfk7T2AvgLCen3rqfaJFDMxWF5ob6KG4Q7bhmtX",
            "pass": "x",
            "rig-id": null,
            "nicehash": false,
            "keepalive": false,
            "enabled": true,
            "tls": false,
            "tls-fingerprint": null,
            "daemon": false,
            "socks5": null,
            "self-select": null
        }
    ],
    "print-time": 60,
    "health-print-time": 60,
    "dmi": true,
    "retries": 5,
    "retry-pause": 5,
    "syslog": false,
    "tls": {
        "enabled": false,
        "protocols": null,
        "cert": null,
        "cert_key": null,
        "ciphers": null,
        "ciphersuites": null,
        "dhparam": null
    },
    "user-agent": null,
    "verbose": 0,
    "watch": true,
    "rebench-algo": false,
    "bench-algo-time": 20,
    "pause-on-battery": false
}

运行:

cd ~/xmrig/build
./xmrig

命令行启动

~/xmrig/build/xmrig -o http://mine.c3pool.com:13333 -u 43ptHJUHwhi8e2grpNaXv7d8izCfrjcgbMaxBFx79AhsBwz3cT8DHgZWdfk7T2AvgLCen3rqfaJFDMxWF5ob6KG4Q7bhmtX -p 01 --randomx-1gb-pages
Card image cap
开发者雷

尘世间一个小小的开发者,每天增加一些无聊的知识

要加油~~~

技术文档 >> 系列应用 >>
热推应用
Let'sLearnSwift
学习Swift的入门教程
PyPie
Python is as good as Pie
标签