闲置服务器的CPU算力挖XMR

Centos 6

矿池:xmr.nanopool.org

yum -y install epel-release
yum -y install centos-release-scl cmake3 hwloc-devel libmicrohttpd-devel openssl-devel
yum -y install devtoolset-4-gcc*
yum -y install git
scl enable devtoolset-4 bash
git clone https://github.com/fireice-uk/xmr-stak-cpu xmr-stak
cd xmr-stak

#调整百分之二的开发者捐赠
sed -i 's/2.0/0.0/g' donate-level.h
cmake3 .
make install

cd /root/xmr-stak/bin
先运行一遍
./xmr-stak-cpu

会给出推荐的CPU配置信息,将它编辑进config.txt,并填写钱包地址、矿池地址、Payment ID等信息
httpd_port 设置http访问端口,可以用网页查看矿机状态

"cpu_threads_conf" :
[
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 1 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 2 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 3 },
],
"pool_address" : "xmr-eu1.nanopool.org:14444",
"wallet_address" : "42bhDV2R5zF4KkQ5maiwJCiiwxckdhTcqEFGgwggbr938TXNC5Di6d8jXqrT3anyZ22j7DEE74GkbVcQFyH2nNiC3fpvU7j.0648b3bdea5e2d3a63bb2bbb9ee7592abab7728bc93e18d3ddac22c21937fed8",
"pool_password" : "x",
"httpd_port" : 3128,
正式运行:
./xmr-stak-cpu
EDIT: 关于Payment ID:
openssl rand -hex 32

EDIT: 关于Linux下挖矿出现MEMORY ALLOC FAILED: mmap failed
解决方案:
sysctl -w vm.nr_hugepages=128
echo "* soft memlock 262144" >> /etc/security/limits.conf
echo "* hard memlock 262144" >> /etc/security/limits.conf
reboot

编译好的绿色版(centos 6 x64)

bin

发表评论

电子邮件地址不会被公开。 必填项已用*标注