Tuesday, April 9, 2013

Headless Debian Bitcoin CPU mining

So I have decided to give this bitcoin mining an attempt. I am a server admin and I have access to many servers (that I am paying for) that often have CPU`s just sitting around doing nothing. So I decided to take that spare CPU time and turn it into bitcoins.

I should point out that CPU mining is pretty pathetic when compared to GPU mining, but sometimes when spare CPU`s are all you have... you may as well use them.

Most of the servers I have are either Ubuntu or Debian so you should be able to use this guide for either of those two operating systems.

The idea of this post is to setup a headless bitcoin cpu miner on bored, underutilized servers.

First things first, lets install all the requirements (Ubuntu users, do not forget the sudo command):
apt-get install libcurl4-openssl-dev automake git
 Once that is installed go to your favorite place to do your installs from. In my case its /root and type the following to download cpuminer using Git:
git clone https://github.com/jgarzik/cpuminer
Once CPUminer is downloaded you can cd (move) into the directory it creates
cd /root/cpuminer
Once in the directory you type the following command:
./autogen.sh
And the you can configure and compile cpuminer with the following commands:

./configure
make
make install
Now you are pretty much done. All you need to is run it with the right credentials. To get your credentials go sign up at a pooled mining site like this one:
http://mining.bitcoin.cz/
You will be given a worker username and password during the sign up process (this is different from your site login information you supply when you register).


To run CPUminer with your credentials, the command will look something like this:

minerd --url http://api.bitcoin.cz:8332 --userpass coolname.worker1:pass34534

I have highlighted in a different color the username and password you need to change. You will need to change these to the details given to you by Bitcoin.cz


If everything went successfully you should see something like this:


[2013-04-09 10:07:43] Binding thread 0 to cpu 0
[2013-04-09 10:07:43] Long-polling activated for http://api.bitcoin.cz:8403
[2013-04-09 10:07:44] Binding thread 1 to cpu 1
[2013-04-09 10:07:45] Binding thread 2 to cpu 2
[2013-04-09 10:07:46] Binding thread 3 to cpu 3
[2013-04-09 10:07:47] 4 miner threads started, using SHA256 'c' algorithm.
[2013-04-09 10:08:01] thread 0: 16777215 hashes, 942.40 khash/sec
[2013-04-09 10:08:02] thread 1: 16777215 hashes, 942.32 khash/sec
[2013-04-09 10:08:03] thread 2: 16777215 hashes, 942.88 khash/sec
[2013-04-09 10:08:04] thread 3: 16777215 hashes, 942.05 khash/sec


That is that. Everything should be running fine. You should run this in the screen command so you can detach and reattach at will.

If you found this useful, please click on one of the sponsor or advertising links on this page!



13 comments:

  1. "make" and "make file" don't work:

    -bash: make: command not found
    -bash: make: command not found

    "minerd --url http://api.bitcoin.cz:8332 --userpass coolname.worker1:pass34534" also don't work:

    -bash: minerd: command not found


    ReplyDelete
  2. PS: If I enter "./autogen.sh" it says:

    Makefile.am:12: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

    Makefile.am:12: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

    ReplyDelete
  3. Do you have compiling tools installed? Try this:

    # apt-get update && apt-get upgrade
    # apt-get install build-essential

    ReplyDelete
  4. Assist consider anyone towards government's radar. exactly who knows, maybe The item end user selling unobtainable that you should lone buy with get bitcoins, is throughout a series of police department, looking to bust you.

    ReplyDelete
  5. High website you hold. Do you already stomach Bitcoins? I would propose to experience up at who-accepts-bitcoins.com. They leave create the reciprocation you beggary as their database is ofttimes searched by bitcoin spenders. It's atrip tho'!

    ReplyDelete
  6. where to spend bitcoin is descriptive of the actual technology in play. These coins represent the currency itself and are the ones transacted

    ReplyDelete
  7. Bitcoin is a type of electronic money (Cryptocurrency) that is autonomous from Trade bitcoin online banking. It started to be circulated in 2009 and is considered as the best known digital currencies around. Bitcoins rely on computer networks to solve complex math problems to verify and record the details of each transaction made.

    ReplyDelete
  8. Higher web page you own. Would you witout a doubt belly Bitcoins? We would suggest experiencing way up Many people abandon produce Gemtot Ibeacons online the actual reciprocation anyone beggary because their data bank is actually ofttimes looked for by bitcoin spenders.

    ReplyDelete
  9. I'm impressed, I must say. Very rarely do I come across a blog that's both informative and entertaining, and let me tell you, you've hit the nail on the head.Watercolor Paintings for sale

    ReplyDelete
  10. make: *** No targets specified and no makefile found. Stop.

    ReplyDelete
  11. Based on my experience, I don't use cpu mining because when I turned on my server it will automatically overclocked and it does not leave any idle cpu's. Increase Soundcloud Re-posts

    ReplyDelete
  12. Such an interesting post. I am very happy to read this amazing article of yours. Thank you so much for sharing. I'll be surely looking forward for more. get pinterest repins

    ReplyDelete
  13. Hey Thanks for sharing your blog about Blockchain cpu, it is a great article. We really appreciate your work and hope you will share more articles like this one in the future., Please make some other posts with more information as well!

    Miner Hosting Service

    ReplyDelete