Updates:
17-May-2017: Updated guide for Ubuntu 16.04 LTS15-June-2014: Fixed an error in the i0coin.conf included in p2pool-files.tar.gz
15-June-2014: Added instructions on automatic startup after reboot
15-June-2014: Added fusioncoin (for merge mining) and updated binaries
16-June-2014: Added Lazy guy's installation method
16-June-2014: Added namecoin.conf in p2pool-files.tar.gz and fixed start-p2pool
16-June-2014: Added rpcallowip=127.0.0.1 to all config files
21-June-2014: Added huntercoin to the guide
21-June-2014: Implemented a lot of suggestions from KyrosKrane. Addded a firewall script and reordered the commands for "lazy" installation method.
15-July-2014: Updated huntercoind and added bitcoin 0.9.2.1 in the binaries (I didn't compile it, I just used the 64-bit precompiled binary from bitcoin.org) as PPA has older version.
24-August-2014: Updated namecoind and huntercoind. Note that you might have to download blockchain of namecoin again after updating.
9-September-2014: Updated again namecoind and huntercoind to latest versions.
MAJOR UPDATE:
Please visit KyrosKrane page at: http://bitcoin.kyros.info/
He provides a more complete automated script.
If you still need to read all the details on how everything is done please read on!
IMPORTANT SECURITY NOTE: If you are running your server on a VPS with full internet access make sure you change the rpcpassword or edit your config files and add rpcallowip=127.0.0.1
Announcing: Lazy guy's installation methodSo you are too bored to read all this?
This is too technical for you?
Do you want to have P2Pool up and running within 5 minutes with only 2 commands to execute?
After you install Linux Ubuntu 14.04 LTS, login and execute the following commands:
wget http://pool.nitro.gr/install-p2pool.sh
sudo sh ./install-p2pool.sh
sudo chown -R $(whoami):$(whoami) .*
sudo chown -R $(whoami):$(whoami) *
It will install everything (it will use the binaries not compile everything again) and you just have to wait...
Do a reboot and you are done.
Then jump to "END OF COMPILATION OF FILES"
Some history:
I created this guide to have up to date P2Pool installation instructions on latest version of Ubuntu LTS (currently 14.04).
People may consider it difficult to get a P2Pool node up and running but in fact it's very simple if you have some basic Linux knowledge.
In this guide I will provide BTC and merged mining NMC, DVC and IXC (in order to match GHash.io's offering).
Note that althought BTC mining is distributed among P2Pool miners, merged coins (e.g. NMC and IXC) will not be distributed to others but you will solo mine those. If you mine exclusively with P2Pool you will get the same profit (and a bit more) compared to mining to other pools. In the long run NMC/DVC/IXC profit will be the same.
Install Ubuntu 14.04 LTS Server from here:
http://www.ubuntu.com/download/server(note do not install Ubuntu DESKTOP 14.04 LTS - you need Server version for text only install)
I will not cover instructions on how to do this. You can install it in a virtual machine or a physical machine.
For virtual machine start with 2 Processors and 4GB memory. Suggested disk size is 60GB (that's a lot but you will have room to grow).
Create a user and run all the commands as a user NOT as root.
If you find any mistakes please let me know!
First thing after you install ubuntu is to install all updates for Ubuntu and reboot your machine:
sudo apt-get dist-upgrade
Grab Bitcoin from repository and install it:
apt-get -y install software-properties-common aptitude
sudo add-apt-repository ppa:bitcoin/bitcoin
(Press ENTER to accept)
sudo apt-get update
Install the following prerequisites to build NMC,DVC and IXC plus to install the Bitcoin client:
Note - the following is one line and will download and install a lot of packages:
sudo aptitude install bitcoind python-software-properties screen git python-rrdtool python-pygame python-scipy python-twisted python-twisted-web python-imaging build-essential libglib2.0-dev libglibmm-2.4-dev libqt4-dev python-dev libssl-dev libdb5.1++-dev libboost1.55-all-dev dh-autoreconf libcurl4-openssl-dev libminiupnpc-dev ufw
Grab P2Pool:
cd ~
sudo git clone git://github.com/forrestv/p2pool.git
For the next part I provide two solutions.
One solution is to compile everything on your own. In that case you need all the prerequisites above.
The other, easier and faster solution is to download the binaries compiled and as a bonus I have all the configuration files mentioned below.
So to grab the precompiled files just do:
cd ~
wget http://pool.nitro.gr/p2pool-files.tar.gz
tar xvzf p2pool-files.tar.gz
To verify that the file you have downloaded is correct do the following:
md5sum p2pool-files.tar.gz
You should get:
5f1826181effbd32bd24ce5cb2b713e6 p2pool-files.tar.gz
If all is good - then you can do "rm p2pool-files.tar.gz" to delete the package as everything is already extracted or hang on to it.
If you prefer to compile everything or see what I have included in the p2pool-files.tar.gz please read on:
START OF COMPILATION AND CREATION OF FILES:Create a directory to install the binaries and the directories for each coin:
mkdir ~/bin
mkdir ~/.bitcoin
mkdir ~/.namecoin
mkdir ~/.ixcoin
mkdir ~/.devcoin
Grab Namecoin, compile it and copy it to the ~/bin directory:
cd ~
git clone https://github.com/namecoin/namecoin
cd ~/namecoin/src
make -f Makefile
strip namecoind
cp namecoind ~/bin
Grab IXC, compile it and copy it to the ~/bin directory:
cd ~
git clone https://github.com/FrictionlessCoin/iXcoin
cd ~/iXcoin/src
make -f makefile.unix
strip ixcoind
cp ixcoind ~/bin
Grab Devcoin, compile it and copy it to the ~/bin directory:
cd ~
git clone git://gitorious.org/devcoin/devcoin.git
cd ~/devcoin/src
make -f makefile.unix USE_PNP=1 devcoind
strip devcoind
cp devcoind ~/bin
Create the configuration files for each coin (bitcoin.conf,namecoin.conf,ixcoin.conf,devcoin.conf):
Note - copy/paste only the "cat" command, press enter - then copy paste the rest of the commands.
cat >~/.bitcoin/bitcoin.conf
server=1
daemon=1
rpcuser=bitcoin
rpcpassword=h3wby4zWjGwywZ
rpcallowip=127.0.0.1
Press CTRL-D
cat >~/.namecoin/namecoin.conf
server=1
daemon=1
rpcuser=namecoin
rpcpassword=e9s4bmEaHvofEZ
rpcport=7333
rpcallowip=127.0.0.1
Press CTRL-D
cat >~/.ixcoin/ixcoin.conf
server=1
daemon=1
rpcuser=ixcoin
rpcpassword=KouZ4RvmT3WkKZ
port=8337
rpcport=8338
rpcallowip=127.0.0.1
Press CTRL-D
cat >~/.devcoin/devcoin.conf
server=1
daemon=1
rpcuser=devcoin
rpcpassword=KouZ4RvmT3WkKZ
rpcport=6333
port=6334
rpcallowip=127.0.0.1
Press CTRL-D
END OF COMPILATION OF FILESYou are not ready to start P2Pool just yet. The BTC/NMC/DVC/IXC blockchain has to be downloaded first and it will take about 2 days.
So execute these commands and wait...
/usr/bin/bitcoind
~/bin/ixcoind
~/bin/namecoind
~/bin/devcoind
Make sure that blockchain has finished downloading for all coins.
You can check that by going into .bitcoin/.namecoin/.ixcoin and do tail -f debug.log.
If you see downloading of old dates then you should wait before even starting P2Pool.
Run this command to start P2Pool:
screen -d -m -S p2pool ~/p2pool/run_p2pool.py bitcoin h3wby4zWjGwywZ --merged http://ixcoin:KouZ4RvmT3WkKZ@127.0.0.1:8338/ --merged http://namecoin:e9s4bmEaHvofEZ@127.0.0.1:7333 --merged http://devcoin:KouZ4RvmT3WkKZ@127.0.0.1:6333
You can view the P2Pool ouput using
You disconnect from the P2Pool output by pressing: Ctrl-A and then D (nothing will show on screen)
EXTRA COINS (already available in the precompiled files):I0C - i0coinCompile i0coin:
cd ~
git clone http://github.com/rsnel/i0coin/
cd i0coin/src
make -f makefile.unix i0coind
strip i0coind
cp i0coind ~/bin
Create i0coin configuration file:
mkdir ~/.i0coin
cat >~/.i0coin/i0coin.conf
server=1
daemon=1
rpcuser=i0coin
rpcpassword=KouZ4RvmT3WkKZ
port=7337
rpcport=7338
rpcallowip=127.0.0.1
Press Ctrl-D
Start ~/bin/i0coind and wait for the blockchain to download as well.
Add it to your startup script if needed and modify P2Pool startup to include it. Just append at the end of the p2pool command:
--merged http://i0coin:KouZ4RvmT3WkKZ@127.0.0.1:7338
e.g.
screen -d -m -S p2pool ~/p2pool/run_p2pool.py bitcoin h3wby4zWjGwywZ --merged http://ixcoin:KouZ4RvmT3WkKZ@127.0.0.1:8338/ --merged http://namecoin:e9s4bmEaHvofEZ@127.0.0.1:7333 --merged http://devcoin:KouZ4RvmT3WkKZ@127.0.0.1:6333 --merged http://i0coin:KouZ4RvmT3WkKZ@127.0.0.1:7338
FSC - Fusioncoin (NOT Friendshipcoin)Don't confuse Fusioncoin with Friendshipcoin. Fusioncoin is SHA-256 while is Frinedshipcoin is Scrypt!
Compile fusioncoin:
cd ~
git clone https://github.com/fusioncoin/fusioncoin
cd ~/fusioncoin/src
make -f makefile.unix
strip fusioncoind
cp fusioncoind ~/bin
Create fusioncoin configuration file:
mkdir ~/.fusioncoin
cat >~/.fusioncoin/fusioncoin.conf
server=1
daemon=1
rpcuser=fusioncoin
rpcpassword=KouZ4RvmT3WkKZ
port=8492
rpcport=18491
rpcallowip=127.0.0.1
Press Ctrl-D
Start ~/bin/fusioncoin and wait for the blockchain to download as well.
Add it to your startup script if needed and modify P2Pool startup to include it. Just append at the end of the p2pool command:
--merged http://fusioncoin:KouZ4RvmT3WkKZ@127.0.0.1:18491
e.g.
screen -d -m -S p2pool ~/p2pool/run_p2pool.py bitcoin h3wby4zWjGwywZ --merged http://ixcoin:KouZ4RvmT3WkKZ@127.0.0.1:8338/ --merged http://namecoin:e9s4bmEaHvofEZ@127.0.0.1:7333 --merged http://devcoin:KouZ4RvmT3WkKZ@127.0.0.1:6333 --merged http://i0coin:KouZ4RvmT3WkKZ@127.0.0.1:7338 --merged http://fusioncoin:KouZ4RvmT3WkKZ@127.0.0.1:18491
HUC - Huntercoin Note that Huntercoin drains a lot of resources to sync. Syncing of the blockchain may also take a week before you can start merge mining it.
After syncing CPU/memory usage is normal.
Compile huntercoin:
cd ~
git clone https://github.com/chronokings/huntercoin
cd ~/huntercoin/src
make -f Makefile
strip huntercoind
cp huntercoind ~/bin
Create huntercoin configuration file:
mkdir ~/.huntercoin
cat >~/.huntercoin/huntercoin.conf
server=1
daemon=1
rpcuser=huntercoin
rpcpassword=KouZ4RvmT3WkKZ
port=8398
rpcport=8399
rpcallowip=127.0.0.1
Press Ctrl-D
Start ~/bin/huntercoin and wait for the blockchain to download as well.
Add it to your startup script if needed and modify P2Pool startup to include it. Just append at the end of the p2pool command:
--merged http://huntercoin:KouZ4RvmT3WkKZ@127.0.0.1:8399