How to mine Bitcoin in Ubuntu using OpenCL and Bitcoinminer.py

Bitcoin is a form of decentralize digital currency, so unlike other digital currency services (like e-gold), bitcoin is not susceptible to be frozen, seized or invalidated. Bitcoin can be transfered transfered directly from person to person directly without intermediaries.

Bitcoin are generated over the internet by application called bitcoin miners using a set of algorithm to ensure that the number of generated bitcoin is within predictable and limited range. Though with the numbers of bitcoin in circulation today means that it would require significant processing power to generate bitcoins, it doesn’t stop anybody who are willing to try and mine them.

For a brief introduction to Bitcoin, please watch :

Bitcoin Miner on Ubuntu ?
Enter OpenCL and Bitcoinminer.py which allows bitcoin to be mined using a much more efficient GPU power (certain models of Nvidia and ATI graphic cards only, with appropriate drivers).

Step 1: To install the miner, you need to “install python-pyopencl subversion.

Step 2: Then you need to use subversion to obtain python-jsonrpc, by running:

svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc/
sudo python setup.py install

Step 3: Then you need to generate bitcoin.conf file:

cd ..
mkdir .bitcoin
echo "rpcuser=username" > .bitcoin/bitcoin.conf
echo "rpcpassword=password" >> .bitcoin/bitcoin.conf

Step 4: After that, download BitcoinMiner files

wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.cl
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.py
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/poclbm.py

Step 5: Download bitcoin server for linux

wget http://iweb.dl.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.3.19/bitcoin-0.3.19-linux.tar.gz
tar xvf bitcoin-0.3.19-linux.tar.gz
~/bitcoin-0.3.19/bin/64/bitcoin -server&

Step 6: Then finally, running the miner

python poclbm.py -d 0 --user username --pass password

The parameter -d 0 denotes that the miner will use GPU #1 for its bitcoin mining generation, increment it to -d 1 for GPU #2 and so forth. Change the “password” and “username” parameter from Step 3 and Step 6 appropriately to keep people from reaping the fruits (read: steal bitcoins) of your mining operation.

For more information about mining bitcoins and about Bitcoin in general, please visit : WeUseCoins website

6 Replies to “How to mine Bitcoin in Ubuntu using OpenCL and Bitcoinminer.py”

  1. A dump question… But where do i get these coins? How can i use them? Or where can i look on a summary how much coins were minded after a few days of burning the GPU?

  2. Traceback (most recent call last):
    File “BitcoinMiner.py”, line 8, in
    from sha256 import *
    ImportError: No module named sha256

    Same here. :( I tried to find it in the REP

  3. When trying to run Step 6, I get:

    “ImportError: No module named sha256”

    Where to get that one? I have python 2.6.6.

  4. Throws an error:

    Traceback (most recent call last):
    File “poclbm.py”, line 3, in
    import pyopencl as cl
    File “/usr/lib/pymodules/python2.6/pyopencl/__init__.py”, line 3, in
    import pyopencl._cl as _cl
    ImportError: libOpenCL.so.1: cannot open shared object file: No such file or directory

    OpenCL is installed…

Comments are closed.