Install P2Pool-drk and Add a CPU Miner to the Server
(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.)
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:
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
Here's where we actually get p2pool-drk and xcoin-hash (which we also need) and install them.
1.) Create a screen session for P2Pool so it persists even if you aren’t logged in to the machine:
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.)
View Your P2Pool-drk Webpage
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.
Refresh your page at http://<ip.add.re.ss>:7903/ to admire the new look!
Install A CPU Miner
Now get darkcoin-cpuminer from github, and install it:
sudo git clone https://github.com/elmad/darkcoin-cpuminer-1.3-avx-aes
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:
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.)
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:
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.
cp index.html index.html.original
sudo nano index.html
Some of the simple things to customize would be:
(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:
|Powered by AlienEngine. Get yours now!|