轻松搞定门罗币挖矿「实战篇」
因公众号粉丝留言说门罗币挖坑遇到很多坑,故而实战此篇仅作技术交流及内容留存。
基于Linux平台
测试环境
Ubuntu 18.04 LTS
Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz 单核
修改本地源
因国内阿里、清华及其他旧的源均存在一些坑点,经过测试建议设置如下源
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted## Major bug fix updates produced after the final release of the## distribution.deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team. Also, please note that software in universe WILL NOT receive any## review or updates from the Ubuntu security team.deb http://us.archive.ubuntu.com/ubuntu/ bionic universe# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universedeb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu## security team.deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiversedeb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse## N.B. software from this repository may not have been tested as## extensively as that contained in the main release, although it includes## newer versions of some applications which may provide useful features.## Also, please note that software in backports WILL NOT receive any review## or updates from the Ubuntu security team.# deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse## Uncomment the following two lines to add software from Canonical's## 'partner' repository.## This software is not part of Ubuntu, but is offered by Canonical and the## respective vendors as a service to Ubuntu users.# deb http://archive.canonical.com/ubuntu bionic partner# deb-src http://archive.canonical.com/ubuntu bionic partnerdeb http://security.ubuntu.com/ubuntu bionic-security main restricted# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricteddeb http://security.ubuntu.com/ubuntu bionic-security universe# deb-src http://security.ubuntu.com/ubuntu bionic-security universedeb http://security.ubuntu.com/ubuntu bionic-security multiverse# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse环境部署apt-get updateapt-get upgra -yapt-get install git build-essential cmake libuv1-dev libssl-dev libhwloc-devgit clone https://github.com/xmrig/xmrig.gitmkdir xmrig/build && cd xmrig/buildcmake ..make -j$(nproc)自定义赞助费cd xmrig/srcvim donate.h将如下内容修改为0或自定义
constexpr const int kDefaultDonateLevel = 0;constexpr const int kMinimumDonateLevel = 0;配置向导
进入 https://xmrig.com/wizard 选择New configuration
选择矿池
添加矿池信息
根据需求选择,默认只有CPU
设置赞助费,默认最低为1%,可按照上面的说明修改脚本,执行后不影响实际挖矿结果依然为自定义结果
配置结果展示,实战中推荐用下面的命令模式进行测试,除非对此文件很熟悉,可下载Config文件并编辑执行
配置hugepages
打开hugepages后算力能提升大概30%左右
core=`nproc --all`sudo bash -c "echo vm.nr_hugepages=$core >> /etc/sysctl.conf"
效果
直接通过命令的方式进行执行【注:需要先执行一遍,再关闭,会在本地生成config.json文件,可自定义配置文件】
./xmrig -o sg.minexmr.com:443 -u 钱包地址 -k --tls --rig-id 小生观察室
因用单核CPU去挖,所以对应的miner不会很多在600左右。
基于Windows平台
测试环境
WindowsServer2008R2
Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz 8核
环境部署
https://github.com/xmrig/xmrig/releases
选择xmrig-6.7.2-msvc-win64.zip版本
下载至本地并解压,将xmrig的配置向导中最后一步生成的Windows命令复制并修改start.cmd文件。
配置向导过程与Ubuntu一致,此处忽略重复步骤!!!
自定义赞助费
修改config.json文件中donate-level": 0或在命令行中添加 --donate-level 0
配置hugepages
在本地安全策略下启动锁定内存页并添加账户
最简单的方法:以管理员身份运行一次矿机,然后重新启动手动配置可参考此处 https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/enable-the-lock-pages-in-memory-option-windows?redirectedfrom=MSDN&view=sql-server-ver15
效果
直接通过命令的方式进行执行【注:需要先执行一遍,再关闭,会在本地生成config.json文件,可自定义配置文件】
xmrig.exe -o sg.minexmr.com:443 -u 钱包地址 -k --tls --rig-id 小生观察室
- 免责声明
- 世链财经作为开放的信息发布平台,所有资讯仅代表作者个人观点,与世链财经无关。如文章、图片、音频或视频出现侵权、违规及其他不当言论,请提供相关材料,发送到:2785592653@qq.com。
- 风险提示:本站所提供的资讯不代表任何投资暗示。投资有风险,入市须谨慎。
- 世链粉丝群:提供最新热点新闻,空投糖果、红包等福利,微信:juu3644。