DEVTOME.COM HOSTING COSTS HAVE BEGUN TO EXCEED 115$ MONTHLY. THE ADMINISTRATION IS NO LONGER ABLE TO HANDLE THE COST WITHOUT ASSISTANCE DUE TO THE RISING COST. THIS HAS BEEN OCCURRING FOR ALMOST A YEAR, BUT WE HAVE BEEN HANDLING IT FROM OUR OWN POCKETS. HOWEVER, WITH LITERALLY NO DONATIONS FOR THE PAST 2+ YEARS IT HAS DEPLETED THE BUDGET IN SHORT ORDER WITH THE INCREASE IN ACTIVITY ON THE SITE IN THE PAST 6 MONTHS. OUR CPU USAGE HAS BECOME TOO HIGH TO REMAIN ON A REASONABLE COSTING PLAN THAT WE COULD MAINTAIN. IF YOU WOULD LIKE TO SUPPORT THE DEVTOME PROJECT AND KEEP THE SITE UP/ALIVE PLEASE DONATE (EVEN IF ITS A SATOSHI) TO OUR DEVCOIN 1M4PCuMXvpWX6LHPkBEf3LJ2z1boZv4EQa OR OUR BTC WALLET 16eqEcqfw4zHUh2znvMcmRzGVwCn7CJLxR TO ALLOW US TO AFFORD THE HOSTING.

THE DEVCOIN AND DEVTOME PROJECTS ARE BOTH VERY IMPORTANT TO THE COMMUNITY. PLEASE CONTRIBUTE TO ITS FURTHER SUCCESS FOR ANOTHER 5 OR MORE YEARS!

subtitle: the dummy's guide to setting up a merged mining pool

Setting up your own pool might seem like a very daunting task, but with a Linux machine and a little basic Linux knowledge you too can set up your very own merged mining pool, to mine for Bitcoin and Namecoin (more merged mining compatible coins are coming soon). I will do the best I can to keep this tutorial up to date with the most recent information.

What we need :

'''Linux''', preferably Debian/Ubuntu or something similar
['''Bitcoind''']http://www.bitcoin.org for Linux 0.50 or later
['''Namecoind''']https://github.com/ArtForz/namecoin/zipball/master for Linux (ArtForz Fork)
'''PoolserverJ 0.40'''
'''Mysql Database'''
'''Java'''
'''screen'''

I will make Bitcoind and Namecoind i386 binaries available for download, these were compiles on an intel CPU so if you have AMD CPU or something else you will need to compile your own binaries, otherwise these might work for you and will save you some time:

://btcwebhost.com/files/bitcoindhttp://btcwebhost.com/files/bitcoind

://btcwebhost.com/files/namecoindhttp://btcwebhost.com/files/namecoind

remember if you download the binaries you will have to chmod +x bitcoind and chmod +x namecoind to make them executable.

if You are using an AMD chip or the binaries wont work for some other reason you will have to download Bitcoind and Namecoind sources from the links below, instructions to compile them are found inside the archives.

[Bitcoind 0.50] http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.5.0/bitcoin-0.5.0-linux.tar.gz/download

[ArtFoz Namecoind from]https://github.com/ArtForz/namecoin/zipball/master

LET'S GET THE PARTY STARTED:

First thing we need to do is get the Bitcoin and Namecoin daemons installed and get the block chains to start downloading, it will likely take 1 whole day just to download the block chains and they have to be completely downloaded before you can start up your pool.

lets download the binaries and make them executable

coinserver~: wget http://btcwebhost.com/files/bitcoind

coinserver~: wget http://btcwebhost.com/files/namecoind

coinserver~: chmod +x bitcoind

coinserver~: chmod +x namecoind

lets create the data directories

coinserver~: mkdir ~/.bitcoin

coinserver~: mkdir ~/.namecoin

lets create configuration files (bitcoin.conf)

coinserver~: pico ~/.bitcoin/bitcoin.conf

paste this into the window

server=1

rpcuser=bitcoin

rpcpassword=pool

rpcport=8331

lets create the namecoin config file

coinserver~: pico ~/.namecoin/bitcoin.conf

paste this into the window

server=1

rpcuser=namecoin

rpcpassword=pool

rpcport=8330

Lets get the daemons started and get that huge block chain downloading… first check for screen type :

coinserver~: screen

if screen launches hit enter if nothing happens / you get an error you have to install screen

coinserver~: sudo apt-get install screen

when that finishes go back type

coinserver~: screen

and hit enter

time to launch bitcoin

now type:

coinserver~: ./bitcoind

then hit CONTROL A+D on your keyboard (this is the command to exit screen and leave bitcoind running in the background

now we launch namecoin

coinserver~: screen

coinserver~: ./namecoind

then hit CONTROL A+D on your keyboard (this is the command to exit screen and leave namecoind running in the background

Lets install Java (poolserverj needs java to run)

coinserver~: sudo apt-get install openjdk-6-jdk

Lets install Mysql and dependencies to setup your pool database

coinserver~: sudo apt-get install mysql-server

go ahead and let it download and install everything it needs there, this might take a few mins when it is finished we need mysql-admin to set up the database

coinserver~: sudo apt-get install mysql-admin

again let that download and install everything it needs, when it is finished we can create your database

coinserver~: sudo mysqladmin create poolserverj_native -p[password]

you will need to replace [password] with your root password hint: there is no space between -p and your password, so if your password is bananas it would look like this

sudo mysqladmin create pool -pbananas

now we have to download PoolServerj - These Links currently download versions 0.40rc2 and 0.40rc7 always check the website PoolServerj.org to make sure you are getting the most recent version.

coinserver~: wget http://poolserverj.org/dist/poolserverj-0.4.0rc2.tar.gz

coinserver~: wget http://poolserverj.org/dist/poolserverj-0.4.0rc7-mini-binary.tar.gz

Lets extract it and put the files where they need to be

coinserver~: tar -xvf poolserverj-0.4.0rc2.tar.gz

coinserver~: tar -xvf poolserverj-0.4.0rc7-mini-binary.tar.gz

coinserver~: cd poolserverj-0.4.0rc7-mini-binary

coinserver~: mv poolserverj.jar ../poolserverj-0.4.0rc2/bin

coinserver~: mv *SNAPSHOT* ../poolserverj-0.4.0rc2/lib/lib_non-maven

Now we can setup your config file!

coinserver~: cd ~/

coinserver~: cd poolserverj-0.4.0rc2

coinserver~: cd conf-samples

coinserver~: pico local-daemon-mm.properties

There is a lot of stuff here and it can be overwhelming to the beginner - I am only going to tell you the stuff you need to change from the top to the bottom - I will try to make this as easy as possible!

First thing we are going to have to do is change every instance of localhost to 127.0.0.1, some people have trouble with this being localhost here and I don't want you to have trouble so do this

CONTROL+W

CONTROL+R

replace: localhost

replace with: 127.0.0.1

A (to replace all)

it should say [ Replaced 15 occurrences ]

scroll way down to line: 439 (you can find out what line you are on by hitting CONTROL-C

mysql
db.engine=mysql
db.host=127.0.0.1
db.schema=poolserverj_native
db.port=3306
db.user=ps_test
db.password=ps_test

change :

'''db.user=root'''
'''db.password=[password] (change [password] to your root password)'''

now go down to line 587

source.local.1.localWorkGeneration.payoutAddress=mnn7vBgZgbCXMDts7zFf4xqEpiBWfMEQmQ

Now open up another terminal window, log in and go to your home directory type

./bitcoind getnewaddress

it should give you a Bitcoin address - replace that address on line 587 with the address it just gave you

scroll down to line 599

source.local.1.url=http://127.0.0.1:8372/
source.local.1.p2p.hostport=127.0.0.1:8373
json-rpc username - for standard bitcoind this is set in bitcoin.conf (rpcuser)
source.local.1.username=rpcuser
json-rpc password - for standard bitcoind this is set in bitcoin.conf (rpcpassword)
source.local.1.password=rpcpassword

change this to

source.local.1.url=http://127.0.0.1:8331/
source.local.1.p2p.hostport=127.0.0.1:8373
source.local.1.username=bitcoin
source.local.1.password=pool

now go down to line 635

<nowiki>#</nowiki>source.local.1.merged.namecoin.localCoinbasing=true
source.local.1.merged.namecoin.payoutAddress=mx591aR68CSawEH6WDAkzX9XEnrKjFdfuo
source.local.1.merged.namecoin.url=http://127.0.0.1:8352/
source.local.1.merged.namecoin.username=rpcuser
source.local.1.merged.namecoin.password=rpcpassword

FIRST! Make sure you UN-comment the first line erasing the &lt;nowiki>'#'&lt;/nowiki> from in front of it,

Then go back to your open terminal window you were into before but this time we need a namecoin address

coinserver~: ./namecoind getnewaddress

so here we need to remove the # from in front of the first line, put the namecoin address you got from the terminal window and put it in front of payoutAddress= change the port to 8330, change the username and the password.

that section should look like this:

source.local.1.merged.namecoin.localCoinbasing=true 
source.local.1.merged.namecoin.payoutAddress=
source.local.1.merged.namecoin.url=http://127.0.0.1:8330/  
source.local.1.merged.namecoin.username=namecoin 
source.local.1.merged.namecoin.password=pool

The Config is Finished! Hit CONTROL-X and make sure you save it

now back at the prompt

type

coinserver~: mv local-daemon-mm.properties ../conf/poolserverj.conf

ok now lets get PoolServerJ ready to run

coinserver~: cd ~/

coinserver~: cd poolserverj-0.4.0rc2

coinserver~: cd bin

coinserver~: pico poolserverj.sh

in this file you see at the end $1 $2 $3, well delete that and replace it with this:

start ../conf/poolserverj.conf

hit CONTROL-X and save the file

Congratulations you finished setting up the Pool Back End! and if you did everything right it will work!

But WAIT!!! You can't start it up and have fun with it until that pesky block chain is down downloading

so let it go for about a day, you can check it by doing

coinserver~: ./bitcoind getinfo

when the block number matches the most recent block from http://blockexplorer.com - you know its finished downloading the block chain.

When your ready to start the Pool you do it like this

coinserver~: cd poolserverj-0.4.0rc2

coinserver~: cd bin

coinserver~: screen

coinserver~: ./poolserverj.sh

remember you always want to start everything in a screen so you can put it in the background by hitting CONTROL A+D

if you did everything right and you waited until the block chain finished downloading you should be able to test it out by pointing your miners to port 8999 and you can check out the management interface on port 8997

to test out a miner you will need to go into the database to create a worker username/password for the beginner the best thing to do is install phpmyadmin

coinserver~: sudo apt-get install phpmyadmin

then you need to make sure it loads with apache

coinserver~: sudo pico /etc/apache2/apache2.conf

add this line to the botom of the file:

Include /etc/phpmyadmin/apache.conf

now restart apache2

coinserver~: sudo apachectl restart

this will allow you a gui web interface to edit the Database and add workers and check shares etc, just point your web browser (on the local machine you installed all of this on) to:

http://127.0.0.1/phpmyadmin/

or if you have command line only linux you use lynx

coinserver~: lynx http://127.0.0.1/phpmyadmin

alternatively you can connect to it from another computer on your network, just find out the local IP of the machine and browse it it the same way from your favorite browser.

and login with your root username and password.

then you will need to click on the database ”poolserverj_native

first step is to download this file http://btcnetwork.com/files/poolserverj-native.sql

then look at the top of the screen you will see an “Import” tab click that

and then chose the file you just downloaded, import that by clicking go.


ADD A WORKER TO YOUR POOL DATABASE SO YOU CAN TEST OUT MINING:

insert a worker so you can test out mining on your new pool

Now Let's add a worker so we can test out mining! Follow the image above, click insert on the pool_workers table and on the next screen enter a username and password and click “GO” that username and password is what you want to use when you test out mining on the pool.

If you want to run an actual public pool you will need a web based front end that will allow people to register with your pool, create workers, view statistics etc, its basically an interface between your database and your miners. There are a couple of PoolServerj Compatible front ends and you can find links to them on http://PoolServerj.org

If you are interested in hiring someone to create a front end for you or if you want to hire someone to set up the pool for you I am available for reasonable prices. Just email me at [tom@devcoin.org]tom@devcoin.com

I hope this tutorial was helpful in setting up your pool

GOOD LUCK AND HAPPY MINING

cablepair / tom@devcoin.org

If this tutorial is useful to you please consider sending a donation

Bitcoin: 1HiACV7bpKARiRHGVbmevAnphwN4xjniQ5

Namecoin: N1pboiUnBtZAvd4yd8BiUkYvA2zbTr25KR

Devcoin: 1JHZGh6fNdnCRQC9V8F2h9KjpsqEqzg7Vt

E-Currency


QR Code
QR Code how_to_setup_a_merged_mining_bitcoin_pool_with_poolserverj (generated for current page)
 

Advertise with Anonymous Ads