1.Install three software packages
These are cgminer, bincoin client and p2pool.You can find it on google or github.Just install these follow each steps.
Firstly, sync all block data from internet, when you intalled bitcoin client.This may be spent some hours.A tip, you need have a space disk to store these block data.I recommend you use next command:
The block data will store to btcblock directory in here.
Secondly, configure your bitcoin client as a server.Here, you need to write a config file and put it under btcblock directory.
Next is restart bitcoin client.
bitcoin-qt -conf=/media/work1/btcblock/bitcoin.conf -datadir=/media/work1/btcblock -server
Thirdly, execute the p2pool software.
python run_p2pool.py -a your_bitcoin_addr abc 123
That bitcoin addr was created by bitcoin client.You must be write correct rpcuse and rpcpasword.The reason is bitcoin doesn't use default directory as work directory to store config file and block data.
When you see three "success" words, congratulates!
4.Use cgminer to mining
I write a config file instead of parameters.
"pools" : [
"url" : "127.0.0.1:9332",
"user" : "123",
"pass" : "p2pool"
Save it as p2pool.conf and execute next command:
cgminer -G -c p2pool.conf -S /dev/ttyUSB0
Here, i use Icarus as a miner.That user and pass value is which you want to write.It's not important.