Monero Mining with xmr-stak-cpu on Centos 7

Written by CC Freak on August 7, 2017
  • 25
  •  
  • 2
  •  
  •  
  •  
  •  
  •  
    27
    Shares

My previous article showed how to mine Monero using cpuminer-multi. This article will take a look at xmr-stak-cpu, which in my testing, performs much better for Monero than cpuminer-multi does.

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

After make install runs you will need to change directories:

cd bin/

Then you will run xmr-stak-cpu for the first time

chmod +x xmr-stak-cpu
./xmr-stak-cpu

You will notice that after the first run you are given a notice to edit your config.txt. Follow the instructions provided and also make sure to edit the following lines in bin/config.txt:

"pool_address" : "pool.usxmrpool.com:3333",
"wallet_address" : "46dpA9N1KDE9yERcSGASXPUyA4ga1GrPq5sDXqwwjQL2dAmf5kvgpNQUWdvyT1r55pfwfvuBn2h7YQPhZFYdWtjWUVUTobh",
"pool_password" : "x",

After you have the config.txt edited correctly simply run xmr-stak-cpu once more.

If you run into issues related to mmap this means you need to enable hugepages. To do this type the following commands:

sysctl -w vm.nr_hugepages=128
nano /etc/sysctl.conf

At the end of the sysctl.conf file add:

vm.nr_hugepages=128

If you found this helpful, consider a donation!


  • 25
  •  
  • 2
  •  
  •  
  •  
  •  
  •  
    27
    Shares

Topic tags:

Subscribe
Notify of
guest
36 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments