In this tutorial I assume that you already know about LiteCoin, and have already signed up to a mining pool. If not, probably best go start reading here.
Now we boot up the pi and run through the initial setup steps. We could skip this part, but you may want to run through the steps to expand your SD card and/or overclock your pi. Be warned: overclocking may shorten the life of your pi.
After logging in to the command line, first make sure our distro is running the latest and greatest software by running the following commands
sudo apt-get update
sudo apt-get upgrade
Agree to the prompt to make changes. Go and make a cup of tea while this runs, it won't be quick.
Some time later, when we have a command prompt back, we need to install the pre-requisites we need:
sudo apt-get install make automake build-essential git libcurl4-openssl-dev
Agree to the prompt to continue. You may already have some of these (git for instance), which is fine.
Now we need to get the source code from Github:
git clone git://github.com/pooler/cpuminer.git cd cpuminer
We now have the cpuminer source, so now we build it
./autogen.sh ./configure CFLAGS="-O3" make
This should compile the source code into the binary we need to run. Note that the CFLAGS="-O3" option is the capital letter O for Orange, not zero.
Now we can run the miner. Provide your pool url and username/password and off you go:
./minerd --url=<pool url> --user=<username> --pass=<password> -–debug
I have specified the debug flag here in order to diagnose if there are any issues. You may want to leave that out if you're feeling confident.
You should now see something like this:
As you can see, the hash rate is barely worth the effort. Even with the low power usage of the Raspberry Pi, you will be spending far more in electricity than you will gain in LiteCoins. If you have some solar panels or other free electricity source then this may become viable, but really you’d be better off selling the electricity!
If you like this article, and you’re feeling generous, here is my LTC address: LKRove4ktG8mksNCfVzcnhvdbiFBwW4tF2