Skip to content

BTCAgent (single sub-account edition / 单子账户版) v1.0.0 for Ubuntu 16.04

Compare
Choose a tag to compare
@YihaoPeng YihaoPeng released this 15 May 05:02
· 116 commits to master since this release

安装方法 / Install:

# 切换到root用户。后续大部分操作都需要root权限。
# Switch to user root. Most of the following operations require root privileges.
sudo -i

wget https://github.com/btccom/btcagent/releases/download/su-v1.0.0/btcagent-single_user-1.0.0-Ubuntu_16.04.deb
dpkg -i btcagent-single_user-1.0.0-Ubuntu_16.04.deb
apt-get install -f
systemctl enable supervisor

服务会自动启动。
Service will auto starting.

使用前需要修改矿池地址和子账户名:
It is necessary to modify the pool address and sub-account name:

vim /etc/btcagent/agent_conf.json
例子 / Example:
    ["cn.ss.btc.com", 1800, "testpool"]
含义:
    ["挖矿地址", 端口, "子账户名"]
Meaning:
    ["stratum server address", port, "sub-account name"]

修改好后,重启服务生效:
Restart the service to make it effective:

supervisorctl restart btcagent

请不要在没有修改子账户名并重启btcagent之前连接矿机,否则你将为默认子账户“testpool”挖矿!
矿机的子账户名会被忽略,只使用代理内设置的子账户名。
Please do not connect miner before modifying subaccount name and restarting btcagent, otherwise you will mine for the default subaccount "testpool"!
The miner's sub-account name is ignored and only the sub-account name set in the agent is used.

现在,可以让矿机连接到 这台机器的IP:3333 进行挖矿了。
Now, the miner can be connected to this host's IP:3333 for mining.

更多操作 / More operation:

  • 编辑配置文件 / Edit config file:
    vim /etc/btcagent/agent_conf.json
  • 启动 supervisor (BTCAgent的守护服务) / Start supervisor (daemon service of btcagent):
    service start supervisor
  • 重启BTCAgent / Restart btcagent:
    supervisorctl restart btcagent
  • 停止BTCAgent / Stop btcagent:
    supervisorctl stop btcagent
  • 显示服务状态 / Show service status:
    supervisorctl status
  • 显示日志 / Show logs:
    tail -F /var/log/btcagent/*INFO
    less /var/log/btcagent/*INFO
  • 统计矿机连接数(估算值) / Count connections:
    netstat -antp | grep btcagent | grep -v mu | wc -l