Monero (XMR) Mining on Ubuntu Linux 15.04

A little discussion…
This isn’t an endorsement of Monero. Just one of the many crypto-currencies (kind of like BitCoin) out there that I’m playing with. I find Monero interesting because the project expresses the intent to make their currency untraceable.
There do seem to be some graphical wallets in the works but the main site recommends using MyMonero as a way to get a wallet set-up quickly.
Assumptions:
I’ll make the assumption you are running Ubuntu, are an sudo’er on your system, are familiar with git and/or github and have a Monero wallet address where you can send your mined coins. And, of course, you should be able to use this address to send and receive coins, too.
We’re going to download and compile the CPU miner published by Wolf at https://github.com/wolf9466/cpuminer-multi
Before we being thanks to Wolf and his fellow developers for publishing a GPLV2 CPU miner for the world to use. If you find the miner useful send these developers a donation at:
XMR: 46sSETXrZGT8bupxdc2MAbLe3PMV9nJTRTE5uaFErXFz6ymyzVdH86KDb9TNoG4ny5QLELfopynWeBSMoT1M2Ga8RBkDqTH
OK, the direction posted by the developers on github are pretty good. But, if you are running an Ubuntu system like me you may not have all the required development libraries installed in order to complete the compile and make process. I figure it doesn’t  really hurt to have more dev libraries and tools than you need so I installed many of the usual suspect.
sudo apt-get install aptitude
sudo aptitude update
sudo aptitude install –with-recommends build-essential autotools-dev autoconf automake libcurl3 libcurl4-gnutls-dev git make cmake libssl-dev pkg-config libevent-dev libunbound-dev libminiupnpc-dev doxygen supervisor jq libboost-all-dev htop
Again, you probably don’t need all that stuff but it doesn’t hurt. From this point the directions provided by the developers are pretty straight forward — and you don’t need to be root to complete most of these steps:
Get the source code and compile it :
cd cpuminer-multi
./autogen.sh
CFLAGS=”-march=native” ./configure
make
See if you have an executable file:
./minerd –help to see all the options
Have the miner run when you reboot:
Now to make life simple — and ensure that your miner starts up when you reboot — it is useful to make a simple shell script and then add it to your crontab. (We’ll make the assumption that the cpuminer-multi folder you pulled from github is in your home directory and that is where you will put your script.)
vi monero ## Or, use whatever editor you like to create the monero file and enter the contents:
#!/bin/bash
~/cpuminer-multi/minerd –background -a cryptonight -o stratum+tcp://xmr.prohash.net:7777 -u 42hx34g3FoM1npNDqGAETC8yertQAzofATbZ2e5XvTogbz3J8cudDehAnREQ1ZxaDg1BPqEM6bvMeg5AePaZAowHJBLqYKF -p x 1>&- 2>&- &
chmod +x monero
crontab -e ## At the bottom add the line then save the file
@reboot ~/cpuminer-multi/monero
When you reboot open a terminal window and run the htop command. You should see the cpu miner working away.
Final step:
Edit ~/cpuminer-multi/monero and change the wallet address from my address to your address. It’s up to you if you want to stick with MyMonero or use a different wallet. Perhaps use the one that comes with the full Monero peer to peer server distribution.
In short the only issue I had was not having the pre-requisite libraries installed. I hope you find the above package install tips useful.
Also, there seem to be a lot of mining pool options. I just happened to pick http://xmr.prohash.net but http://monero.crypto-pool.fr and http://xmr.miner.center also seems to be popular. Check this link for a better list:
If you have some tips to share please leave a comment.
If you want send me some monero (always welcome):
XMR: 42hx34g3FoM1npNDqGAETC8yertQAzofATbZ2e5XvTogbz3J8cudDehAnREQ1ZxaDg1BPqEM6bvMeg5AePaZAowHJBLqYKF

8 thoughts on “Monero (XMR) Mining on Ubuntu Linux 15.04

  1. Good step-by-step instructions!
    Just to share for others: “sudo aptitude install –with-recommends” is meant to be
    “sudo aptitude install –with-recommends” meaning *double dash”
    Same for “./minerd –help”.
    Regards to all the cryptocurrency pioneers out there.

    Like

  2. Hey, I followed your steps but after cloning I get this error:

    ./autogen.sh: 8: ./autogen.sh: aclocal: not found

    what should I do?

    Thanks

    Like

    • Make sure you dont copy and paste these commands as is. They are not quite right. The quotes being used are of the wrong type font.

      Like

  3. Most the errors are due to the instructions using the improper type of “quotes” on the CFLAG command.
    Make sure you get all the tools recommended too.

    Like

  4. I actually do not understand how to make this monero file. The contents do now make sense. Can you please read your instructions and clean up the way you posted them. thanks

    Like

Comments are closed.