OpenCL Bitcoin mining on Ubuntu 10.04 LTS

There are lots of guides for getting bitcoin openCL mining enabled on Ubuntu 10.10. But it’s also possible to get it working on 10.04 LTS.

Sorry for the messed up layout. But you’ll probably be copy/pasting anyway 😉

Step 1: Install PyOpenCL
Add ppa:fajran/opencl to Software Sources
Run the command

sudo apt-get install python-pyopencl

Step 2: Get Bitcoin and the OpenCL miner
Run the following script:

sudo apt-get install subversion
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
svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc/
sudo python setup.py install
cd ..
mkdir .bitcoin
echo "rpcuser=un" > .bitcoin/bitcoin.conf
echo "rpcpassword=pw" >> .bitcoin/bitcoin.conf
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 3: get sha256.py

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

Step 4: run!

~/bitcoin-0.3.19/bin/64/bitcoin -server&
python poclbm.py -d 0 --user un --pass pw

This also works for pooled mining

Sources:
http://wiki.tiker.net/PyOpenCL/Installation/Linux/Ubuntu
http://forum.bitcoin.org/?topic=2636