You probably have heard of Bitcoin by now, some say this will be the future our financial transactions. We will see if that’s true or not in years to come. That said, Bitcoin might be hard to grasp on at first, it’s a form of crypto-currency that acts as a currency only live digitally on the internet. This isn’t a guide on understanding what Bitcoin is, but rather a step-by-step guide on how to spin off a virtual machine on your own to start mining Bitcoins. The setup only works for mining on a shared pool, and is what most people out there are doing those days. If you ever hoping to mine some Bitcoins shared pool is your best bet. For a standard desktop CPU to mine a single Bitcoin, according to the calculation some did, it would need 100 years to mine one single Bitcoin.
Step One: Spin Off Virtual Machine on Azure
First go login to Microsoft Azure, they offer free trail if you don’t have a paid plan. We will be using Ubuntu as the base image to run this program called cpuminer.
Click “All Resources” > Type “Ubuntu” Pick Ubuntu Server 15.04 or 14.04 both are ok.
Click Create, this will proceed and you will need to give a hostname, user name and password. Remember the user name and password as that’s your root user to use to SSH login to the server.
Step Two: Install Dependencies and Compile cpuminer
Use a tool such as Putty to SSH into the server with the credential and IP from above. Run the command below. First two command make sure your Ubuntu system are up to date. Next, it will grab all the dependencies that cpuminer requires in order to compile and run. After that, you will checkout the source code of cpuminer and compile.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git build-essential libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm
git clone https://github.com/pooler/cpuminer.git
cd cpuminer
./autogen.sh
./configure CFLAGS="-O3"
make
./minerd --url=your.minerpool.org --user=username --pass=password -a sha256d
The last command is the most important, you need to replace the “your.minerpool.org” part to something that usually starts with stratum+tcp:// follow with your shared pool URL and your username and password. Make sure you add –a sha256d in the end if you are mining a shared Bitcoin pool. This is the Bitcoin hash algorithm are in, and by default cpuminer is using Litecoin’s hash algorithm. So if you don’t add that you will be wasting time mining. Your program will never be able to solve any hashes and tractions, and you will never rewarded for the effort.
If you don’t have a shared pool to mine, or don’t know where you should start. There is a list of comparisons of shared pools take a look before start mining !
When you started the mining process, you should expect to see something similar above. If you see any accepted n/n khash/s (yay!!!) that means you are doing it right. You should expect to see rewards from your shared pool whenever you scoring a hash.
hi Mr.
I follow but get error, how can i solve this. thanks if you can help
ntrungtruc2003@ntrungtruc2003:~/cpuminer$ ./configure CFLAGS=”-03″
checking build system type… x86_64-pc-linux-gnu
checking host system type… x86_64-pc-linux-gnu
checking target system type… x86_64-pc-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking whether make supports nested variables… yes
checking whether to enable maintainer-specific portions of Makefiles… no
checking for style of include used by make… GNU
checking for gcc… gcc
checking whether the C compiler works… no
configure: error: in `/home/ntrungtruc2003/cpuminer’:
which distribution of Linux are you running on? do you have
sudo apt-get install build-essential
installed?