Pages:
Author

Topic: A Complete Guide to P2Pool - Merged Mining (BTC/NMC/DVC/IXC/I0C) plus LTC, Linux - page 27. (Read 198744 times)

legendary
Activity: 1204
Merit: 1000
฿itcoin: Currency of Resistance!
Scope of the P2Pool solution

Own P2Pool server installation, for the Mining of Bitcoins, Namecoins, Devcoins, IXcoins and I0coins using Merged Mining and also, for Litecoins.

Solution based on Ubuntu Linux 11.10 32 bits.

You can install P2Pool easily within a virtual machine powered by KVM, Xen or VMWare.

The payout logic of P2Pool is PPLNS (Pay-Per-Last-N-Shares).

This guide does not require advanced Linux knowledge.

NOTE 1: You need to have your mining rig already working somehere...

NOTE 2: Change aptitude for apt-get if the command do not exist in your installation.


Brief of procedure

1- Install Ubuntu Linux 11.10;

2- Install Bitcoin 0.6.0 Client;

3- Install all packages needed to use P2Pool;

4- Start P2Pool for Bitcoins;

5- Point your miners to your newly P2Pool;

6- Accessing your P2Pool statistics;


(OPTIONAL FROM NOW)

7- Make a one-time donation to all miners of P2Pool simultaneously (including yourself!);

8- Automatic regular donations (daily, weekly or monthly) to the miners;

9- Install all needed packages to compile and use Litecoin, Namecoin, Devcoin, IXcoin and I0coin;

10- Start P2Pool for Litecoins;

11- Point your miners to your newly Litecoin P2Pool;

12- Accessing your Litecoin P2Pool statistics;

13- Make a one-time donation to all miners of Litecoin P2Pool simultaneously (including yourself!);

14- Start P2Pool for Bitcoin with Merged Mining enabled;


Complete procedure


1- Install Ubuntu Linux 11.10 - 32 bits server.

 Download the CD Image of Ubuntu 11.10 from: http://mirror.globo.com/ubuntu/releases/oneiric/ubuntu-11.10-server-i386.iso

 The minimum requirement is a Virtual Machine with the following settings: 2 CPUs, 1024MB of RAM and 10G disk.

 Soon as the CD starts, press F4 and choose "Minimal Installation", for phisical servers or, "Minimal Installation Virtual" for virtual machines powered by Xen, KVM or VMWare.

 During the installation, make a user called "administrative" and give to it a GOOD password. Do not encrypt its homedir during the installation.

2- Installing Bitcoin

Run the following commands:

Code:
sudo aptitude install python-software-properties
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo aptitude update
sudo aptitude install bitcoind

Optional (for Desktops or servers with GUI):

Code:
sudo aptitude install bitcoin-qt

* Configuring and starting Bitcoin

NOTE: Type: "mkdir ~/.bitcoin/" to create this directory.

The file ~/.bitcoin/bitcoin.conf must contain:

Edit the file:
nano ~/.bitcoin/bitcoin.conf

Code:
server=1
daemon=1
rpcuser=usuariox
rpcpassword=SupEr3421Senha_SECRETAandGRandE

To start Bitcoin 0.6.0, type:

Code:
bitcoind

To use bitcoind (0.6.0), type:

Code:
bitcoind help


NOTE: The blockchain download will start now... You NEED to wait the full download BEFORE start P2Pool!!

NOTE: If you already have your P2Pool running alongside with Bitcoin <0.6.0 and want to upgrade Bitcoin, I recomend a new and clean ~/.bitcoin directory for Bitcoin 0.6.0


3- Install all packages needed to use P2Pool;

Code:
sudo aptitude install screen git python-rrdtool python-pygame python-scipy python-twisted python-twisted-web python-imaging


4- Start P2Pool for Bitcoins;

* Get P2Pool latest software version:

Code:
git clone git://github.com/forrestv/p2pool.git

* Running P2Pool

Code:
screen -d -m -S btcp2pool ~/p2pool/run_p2pool.py --give-author 0 usuariox SupEr3421Senha_SECRETAandGRandE

* To connect to your Bitcoin P2Pool output console:

Code:
screen -x btcp2pool

* Blocks mined by P2Pool since you're in:

Code:
grep BLOCK ~/p2pool/data/bitcoin/log

* Got share!

Code:
grep GOT\ SHARE ~/p2pool/data/bitcoin/log

* To donate a small percentage to the P2Pool author, remove the option "--give-author 0":

Code:
screen -d -m -S btcp2pool ~/p2pool/run_p2pool.py usuariox SupEr3421Senha_SECRETAandGRandE

* Upgrading P2Pool to a newer version:

Code:
cd ~/p2pool
git pull

Then, stop and start P2Pool by connecting to its console and hitting "control+c" and, start it again.

NOTE: You need to know the IP address of your P2Pool server, to get it, type:

Code:
ip r

The IP address will appear right after the string "src".


5- Point your miners to your newly P2Pool;

Code:
cgminer -o http://IP_P2POOL_SERVER:9332/ -u garimpeiro1 -p x -g 1 --auto-fan --auto-gpu --gpu-engine 600-900 --gpu-memclock 180 -I 8 --submit-stale --gpu-reorder --api-listen --api-network


6- Accessing your P2Pool statistics;

Code:
http://IP_P2POOL_SERVER:9332/graphs/


WELL DONE!


Now we have the pluses...


7- Make a one-time donation to all miners of P2Pool simultaneously (including yourself!);

Code:
bitcoind sendmany "" "$(wget -O- http://IP_P2POOL_SERVER:9332/patron_sendmany/5.0)"


8- Automatic regular donations (daily, weekly or monthly) to the miners;

Code:
crontab -e

Type:

Code:
# Daily donations:
#0 0 * * * bitcoind sendmany "" "$(wget -O- http://IP_P2POOL_SERVER:9332/patron_sendmany/2)"

# Weekly donations:
#0 0 * * 0 bitcoind sendmany "" "$(wget -O- http://IP_P2POOL_SERVER:9332/patron_sendmany/5)"

# Monthly donations:
#0 0 1 * * bitcoind sendmany "" "$(wget -O- http://IP_P2POOL_SERVER:9332/patron_sendmany/10)"

NOTE: To activate regular donations, uncomment the line you wish to activate, by removing the carachter "#".


9- Install all needed packages to compile and use Litecoin, Namecoin, Devcoin, IXcoin and I0coin;

Code:
sudo apt-get build-dep bitcoin
sudo aptitude install build-essential libglib2.0-dev libglibmm-2.4-dev libqt4-dev python-dev libcurl4-gnutls-dev

* Litecoin

Code:
git clone https://github.com/coblee/litecoin.git
cd ~/litecoin/src/
make -f makefile.unix litecoind
mkdir ~/.litecoin/

Content of ~/.litecoin/litecoin.conf:

Edit the file:
nano ~/.litecoin/litecoin.conf

Code:
server=1
daemon=1
rpcuser=liteuserx
rpcpassword=nkrt345udsdfjhgjhsdfuyrt78rtTJHRFHTDTYD
rpcport=9334
port=9335
gen=0

* Starting Litecoin

Code:
~/litecoin/src/litecoind

* Using Litecoin

Code:
~/litecoin/src/litecoind help

----------

* Namecoin

Code:
git clone git://github.com/namecoin/namecoin.git
cd ~/namecoin/src/
make -f makefile.unix namecoind
mkdir ~/.namecoin/

Content of ~/.namecoin/bitcoin.conf:

Edit the file:
nano ~/.namecoin/bitcoin.conf

Code:
server=1
daemon=1
rpcuser=usuarioy
rpcpassword=dasdGfhoiu35BCV47586fgdh234GDFSEG
rpcport=7333

* Starting Namecoin

Code:
~/namecoin/src/namecoind

* Using Namecoin
Code:
~/namecoin/src/namecoind help

----------

* Devcoin

Code:
git clone git://github.com/knotwork/old-devcoind.git
cd ~/old-devcoind/src/
make -f makefile.unix bitcoind
mkdir ~/.devcoin/

Content of ~/.devcoin/devcoin.conf:

Edit the file:
nano ~/.devcoin/devcoin.conf

Code:
server=1
daemon=1
rpcuser=devuser
rpcpassword=nggdhuiBGFhgf534746783ujghmgndf
rpcport=6333
port=6334

* Starting Devcoin

Code:
~/old-devcoind/src/bitcoind

* Using Devcoind

Code:
~/old-devcoind/src/bitcoind help

----------

* IXCoin

Code:
git clone git://github.com/ixcoin/ixcoin.git
cd ~/ixcoin/src/
make -f makefile.unix ixcoind
mkdir ~/.ixcoin/

Content of ~/.ixcoin/ixcoin.conf:

Edit the file:
nano ~/.ixcoin/ixcoin.conf

Code:
server=1
daemon=1
rpcuser=ixuser
rpcpassword=DsadsavgfhgfhRt356345fgdfgGSDF

* Starting IXcoin

Code:
~/ixcoin/src/ixcoind

* Using IXcoin

Code:
~/ixcoin/src/ixcoind help

----------

* I0Coin

Code:
git clone git://github.com/doublec/i0coin
cd ~/i0coin/src/
make -f makefile.unix i0coind
mkdir ~/.i0coin/

Content of ~/.i0coin/i0coin.conf:

Edit the file:
nano ~/.i0coin/i0coin.conf

Code:
server=1
daemon=1
rpcuser=i0user
rpcpassword=fHEWQhkhjbcvBCVfhsd32r23rvgfuufGFDgdf
port=7337
rpcport=7338

* Starting I0coin

Code:
~/i0coin/src/i0coind

* Using I0coin

Code:
~/i0coin/src/i0coind help


10- Start P2Pool for Litecoins;

* First, install "litecoin_scrypt" to Python:

Code:
cd ~/p2pool/litecoin_scrypt
sudo python setup.py install

* Start your Litecoin P2Pool:

Code:
screen -d -m -S ltcp2pool ~/p2pool/run_p2pool.py --give-author 0 --net litecoin --bitcoind-rpc-port 9334 --bitcoind-p2p-port 9335 liteuserx nkrt345udsdfjhgjhsdfuyrt78rtTJHRFHTDTYD

* To connect to your Litecoin P2Pool output console:

Code:
screen -x ltcp2pool

* Blocks mined by P2Pool since you're in:

Code:
grep BLOCK ~/p2pool/data/litecoin/log

* Got share!

Code:
grep GOT\ SHARE ~/p2pool/data/litecoin/log


11- Point your miners to your newly Litecoin P2Pool;

Code:
minerd --url http://IP_P2POOL_SERVER:9327/ --userpass ltcminer0:x

12- Accessing your Litecoin P2Pool statistics;

Code:
http://IP_P2POOL_SERVER:9327/graphs/

13- Make a one-time donation to all miners of Litecoin P2Pool simultaneously (including yourself!);

Code:
~/litecoin/src/litecoind sendmany "" "$(wget -O- http://IP_P2POOL_SERVER:9327/patron_sendmany/500.0)"

14- Start P2Pool for Bitcoin with Merged Mining enabled;

Code:
screen -d -m -S multip2pool ~/p2pool/run_p2pool.py --give-author 0 usuariox SupEr3421Senha_SECRETAandGRandE --merged http://usuarioy:[email protected]:7333/


* Multi-Merged-Mining:

Code:
screen -d -m -S multip2pool ~/p2pool/run_p2pool.py --give-author 0 usuariox SupEr3421Senha_SECRETAandGRandE --merged http://usuarioy:[email protected]:7333/ --merged http://devuser:[email protected]:6333/ --merged http://ixuser:[email protected]:8338/ --merged http://i0user:[email protected]:7338/

NOTE: From day 2012/10/02, I'll start daily donations to Litecoin P2Pool miners, 200 LTC per day!

NOTE: From day 2012/10/02, I'll start almost daily donations to Bitcoin P2Pool miners, 1.5 BTC per day, but subdivided in 3 * 0.50 (at 08:00 AM, 16:00 PM and 00:00 AM)!

Regards,
Thiago
Pages:
Jump to: