Install P2Pool-drk and Add a CPU Miner to the Server


(If you have any comments or questions about this guide, please let me know in this thread on DashTalk.org.)

 

(This tutorial assumes that you have set up a secure, "hardened" Linux server according to the instructions here, and that you have installed the Darkcoin daemon according to the instructions here.  If your server has been prepared using other methods, the instructions here may very well not work for you.  Please be sure you know what you are doing.)

 

Install Dependencies

 

At this point, you should be logged-in to your server and running as the general-user (not as the login-user or as root).

 

Make sure you are in your home directory, and install some dependencies:

cd ~

sudo apt-get install python-dev python-zope.interface python-twisted python-twisted-web

sudo apt-get install  libcurl4-openssl-dev libminiupnpc-dev libncurses5-dev libffi-dev libdb5.1++-dev libdb5.1-dev

 

The following line seems to only be needed if your python is version 2.6, but it won't hurt to execute it anyway. It will just not install anything if you already have it.

sudo apt-get install python-argparse
 

Install P2Pool-drk

 

Here's where we actually get p2pool-drk and xcoin-hash (which we also need) and install them.
git clone https://bitbucket.org/dstorm/p2pool-drk

cd ~/p2pool-drk
make
cd ~
git clone https://github.com/darkcoinproject/xcoin-hash.git
cd ~/xcoin-hash
rm -rf build
sudo python setup.py install
cd ~/p2pool-drk/darkcoin-subsidy-python
sudo python setup.py install


Running P2Pool-drk

 

1.) Create a screen session for P2Pool so it persists even if you aren’t logged in to the machine:
sudo screen -S p2pool

 

2.) Then start p2pool-drk this way: (The "-f 1" part means that you will be charging a 1% fee to your miners.  You could change this to whatever you like, but 1% is customary.)
python ~/p2pool-drk/run_p2pool.py -f 1 --give-author 0 --net darkcoin -a <p2pool-darkcoin-address>


3.) To detach from your screen session (and leave it running) hit CTRL+A and then press D   If you ever need to come back to this screen session, just type:
sudo screen -r p2pool

 

View Your P2Pool-drk Webpage


If you haven't already opened port 7093 back in the “Secure Hardened Server” tutorial:
sudo ufw allow 7903

sudo ufw enable

 

You can now view graphs/stats for your p2pool-drk installation by visiting http://<ip.add.re.ss>:7903/ from your browser.

 

At this point the front end looks pretty plain, and if you look carefully at the stats you will see that you are not mining, which makes sense because you have not installed a miner yet.  (The key stat showing that you are not mining is, “Local rate: 0.00H/s (NaN% DOA) Expected time to share: Infinity years.”).  First we'll jazz up our front end a bit, and then we'll install a miner.

 

Install Extended Front End

 

At this point P2Pool is installed.  The default p2pool front-end, however, is rather plain, so we will install the P2Pool Extended Front-End.  This involves downloading it, and then copying the P2PoolExtendedFrontEnd into the ~/p2pool-drk/web-static/ directory (which is where the plain front end is stored).  This replaces the plain front end with the Extended Front End.

cd ~
git clone https://github.com/hardcpp/P2PoolExtendedFrontEnd
cp -a ~/P2PoolExtendedFrontEnd/. ~/p2pool-drk/web-static/


Now we are going to upgrade the look a bit further and install the Punchy UI.  This process involves moving the web-static directory to a web-static-original directory, downloading the Punchy UI, and creating a symlink from the Punchy UI to the web-static directory.

cd ~/p2pool-drk
mv web-static web-static-original
git clone https://github.com/justino/p2pool-ui-punchy.git
ln -s p2pool-ui-punchy web-static

 

Refresh your page at http://<ip.add.re.ss>:7903/ to admire the new look!

 

Install A CPU Miner


P2Pool is now up and running!  Now we're going to install some cpu mining software on our server, so we can mine right from the server.   We'll start by going to our home directory and installing some dependencies
cd ~
sudo apt-get install m4 libssl-dev libdb++-dev libboost-all-dev libminiupnpc-dev automake libcurl4-openssl-dev

 

Now get darkcoin-cpuminer from github, and install it:

sudo git clone https://github.com/elmad/darkcoin-cpuminer-1.3-avx-aes
cd darkcoin-cpuminer-1.3-avx-aes
sudo chmod +x autogen.sh
sudo ./autogen.sh
sudo ./configure CFLAGS="-O3 -march=native"
sudo make

 

Running the CPU Miner

 

1.) Create a screen session for the cpu miner (minerd) so it persists even if you aren’t logged in to the machine:
sudo screen -S minerd

 

2.) Then start the miner like this: (Since the miner is installed on the server itself, we'll use 127.0.0.1 as the ip address.  If we were connecting to some other server, we would need to use that server's actual ip address.  Be sure to copy and pase the following all as one line.)
sudo ~/darkcoin-cpuminer-1.3-avx-aes/minerd -a X11 -o stratum+tcp://127.0.0.1:7903 -u <your-darkcoin-address> -p <any-password-it-does-not-matter>

 

3.) To detach from your screen session (and leave it running) hit CTRL+A and then press D   If you ever need to come back to this screen session, just type:
sudo screen -r minerd

 

Customize the UI

 

You are essentially finished, but if you like you could spend a little time customizing the user interface just a bit.  To do this, we will modify the file ~/p2pool-drk/web-static/index.html, after we save a copy of it.

 

cd ~/p2pool-drk/web-static

cp index.html index.html.original

sudo nano index.html

 

Some of the simple things to customize would be:

  • The <title>
  • Replace all content between <a class="navbar-brand" href="#">and the </a> at the end of the line with your own text, image, or both.
  • Replace any content in <footer> with your own content

And....you're DONE!

 

(If you have any comments or questions about this guide, please let me know in this thread on DashTalk.org.)


Donations to Planet Crypton may be sent to any of the addresses below:
 
Bitcoin   BTC   1DX7CwPpTVRtYDNdJmAgu6YiGNiBbCy8TK
Cryptogenic   CGB   5ZayDGUUNYvu9NPrzVtqHdgp84yZ4V715Y
Darkcoin   DRK   XhwsyqCT5pXmfbMCvjkVefcqTAzsUd1y2z
Datacoin   DTC   DKPxTR42T6PtGzfypyUmZx4SNoF1EV1FVK
Devcoin   DVC   1NoNpadN8SmYv8CvjzeD5BPoct52WdYa2T
Digitalcoin   DGC   DKnA78uyScD7a5ZVmr7tYLxwQxX4731Ad3
Dogecoin   DOGE   DCQnicGvMgghUTtGfJgvx2XjzdS8rqmJK8
Feathercoin   FTC   6e1gquKd4yMFKcnJqBZZb9gnTT19FxnPWX
Infinitecoin   IFC   i9gdFXagtpzeQjgtTr6mQThCqpWLgsFR5n
Ixcoin   IXC   xmd2TwspuvVHuW2VuLnVzoFSwVAoiAkqez
Litecoin   LTC   LMrKrZRayv4Cj8qoXhnmjSACNGHCG3d48t
Memorycoin   MMC   MLjbQa2CEwh6rXiCUYFYkwXq1ByBmytzXt
Namecoin   NMC   N7yPYNXxVar8wWz2JpCskSHWJuE4Jmd77k
Novacoin   NVC   4YFx3yoCVsRtv3sLK1XSgAY818AvM3ic25
Peercoin   PPC   PL7rUo6QwZskuY4h4JseyoiqwH3Zsk7fAz
Primecoin   XPM   ARLG4MD6zbU9yENDAKxGvZYixVQNxZE35R
Protoshares   PTS   PbgsjytSatjxAUPhx13Miq6Q9QjcDwq9Vo
Quarkcoin   QRK   QP8ogwaK63nqkgiEUDyw4pZSCSWFp56tsT
Terracoin   TRC   16m2hwePmsQyWE8qEamoiWBZoaG9oRqGZM
Testnet   TEST   mjKJfi4CZ7yrWofuDtF9SjyuoqCkorhek8
Vertcoin   VTC   VscmvCqXHJszXEJ7aUP8FA1AhXanU6BNeE
Worldcoin   WDC   WT5Mj26e2w5XtyvnkyFKvr3muwBYcbd99h
Zetacoin   ZET   ZQMfBXnju9nCVWV8pH8oja6u7Ujm725pWg

 

 



Powered by AlienEngine. Get yours now!