user1642: How can I setup pushpool on my ubuntu dedi?
I have bitcoind up and running with latest blocks, what's next?

user120: This guide will set up everything you need on a single machine.
Let's get started by setting up the environment:
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install automake gcc
sudo apt-get install libevent-dev libmemcached-dev libcurl4-openssl-dev zlib1g-dev libjansson-dev curl memcached

Depending on your distro some of these may not be available (libjansson-dev for example is not available on Lucid), and you may have to download and compile the sources.
Pushpool requires a database to work so we have to install either SQLite3 or MySQL. MySQL probably is the better choice, but SQLite3 suffices to just test pushpool:
sudo apt-get install libsqlite3-dev sqlite3

To get MySQL you'd instead install libmysql++-dev.
Next we download the pushpool source and extract it to /tmp/:
cd /tmp/
curl -s http://yyz.us/bitcoin/pushpool-0.5.1.tar.gz | tar -xvz
cd pushpool-0.5.1

Now let's get on with it by configuring, compiling and installing it into /opt/pushpool:
./configure --prefix=/opt/pushpool/
make
sudo make install
cd /opt/pushpool/

At this point we can quickly check that everything worked:
$ sbin/pushpoold -E -F
[2013-01-04 16:00:40.682356] config file(server.json): No such file or directory

All we need to do now is to configure the pushpool server.
sudo cp /tmp/pushpool-0.5.1/example-cfg.json /opt/pushpool/server.json
sudo nano /opt/pushpool/server.json

Here's mine for example:
{
        # network ports
        "listen" : [
                # binary protocol (default), port 8336
                { "port" : 8336 },

                # HTTP JSON-RPC protocol, port 8337
                { "port" : 8337, "protocol" : "http-json" }

        ],

        # database settings
        "database" : {
                "engine" : "sqlite3",
                "name" : "/tmp/data.sqlite",
                "stmt.pwdb" :
                  "SELECT password FROM pool_worker WHERE username = ?"

        },

        # cache settings
        "memcached" : {
                "servers" : [
                        { "host" : "127.0.0.1", "port" : 11211 }
                ]
        },

        "pid" : "/tmp/pushpoold.pid",

        # overrides local hostname detection
        "forcehost" : "localhost.localdomain",

        "log.requests" : "/tmp/request.log",
        "log.shares" : "/tmp/shares.log",

        # the server assumes longpolling (w/ SIGUSR1 called for each blk)
        "longpoll.disable" : false,

        # length of time to cache username/password credentials, in seconds
        "auth.cred_cache.expire" : 75,

        # RPC settings
        "rpc.url" : "http://127.0.0.1:8332/",
        "rpc.user" : "bitcoinrpc",
        "rpc.pass" : "bitcoinpassword",

        # rewrite returned 'target' to difficulty-1?
        "rpc.target.rewrite" : true,

        # allow clients to update the ntime field of their work
        "roll.ntime.disable" : false
}

And finally we get to the database setup:
sqlite3 /tmp/data.sqlite "CREATE TABLE pool_worker (username VARCHAR(32), password VARCHAR(32))"
sqlite3 /tmp/data.sqlite "INSERT INTO pool_worker VALUES ('username', 'password');

At this point we have created the database and inserted a new user called username and password password. Running sbin/pushpoold -E -F again will start the daemon.
Pointing your miner to http://username:password@127.0.0.1:8336/ should get you mining.

1642: <p>How can I setup pushpool on my ubuntu dedi?</p>

<p>I have bitcoind up and running with latest blocks, what's next?</p>
 120: <p>This guide will set up everything you need on a single machine.</p>

<p>Let's get started by setting up the environment:</p>

<pre><code>sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install automake gcc
sudo apt-get install libevent-dev libmemcached-dev libcurl4-openssl-dev zlib1g-dev libjansson-dev curl memcached
</code></pre>

<p>Depending on your distro some of these may not be available (libjansson-dev for example is not available on Lucid), and you may have to download and compile the sources.</p>

<p>Pushpool requires a database to work so we have to install either SQLite3 or MySQL. MySQL probably is the better choice, but SQLite3 suffices to just test pushpool:</p>

<pre><code>sudo apt-get install libsqlite3-dev sqlite3
</code></pre>

<p>To get MySQL you'd instead install <code>libmysql++-dev</code>.</p>

<p>Next we download the pushpool source and extract it to <code>/tmp/</code>:</p>

<pre><code>cd /tmp/
curl -s http://yyz.us/bitcoin/pushpool-0.5.1.tar.gz | tar -xvz
cd pushpool-0.5.1
</code></pre>

<p>Now let's get on with it by configuring, compiling and installing it into /opt/pushpool:</p>

<pre><code>./configure --prefix=/opt/pushpool/
make
sudo make install
cd /opt/pushpool/
</code></pre>

<p>At this point we can quickly check that everything worked:</p>

<pre><code>$ sbin/pushpoold -E -F
[2013-01-04 16:00:40.682356] config file(server.json): No such file or directory
</code></pre>

<p>All we need to do now is to configure the pushpool server.</p>

<pre><code>sudo cp /tmp/pushpool-0.5.1/example-cfg.json /opt/pushpool/server.json
sudo nano /opt/pushpool/server.json
</code></pre>

<p>Here's mine for example:</p>

<pre><code>{
        # network ports
        "listen" : [
                # binary protocol (default), port 8336
                { "port" : 8336 },

                # HTTP JSON-RPC protocol, port 8337
                { "port" : 8337, "protocol" : "http-json" }

        ],

        # database settings
        "database" : {
                "engine" : "sqlite3",
                "name" : "/tmp/data.sqlite",
                "stmt.pwdb" :
                  "SELECT password FROM pool_worker WHERE username = ?"

        },

        # cache settings
        "memcached" : {
                "servers" : [
                        { "host" : "127.0.0.1", "port" : 11211 }
                ]
        },

        "pid" : "/tmp/pushpoold.pid",

        # overrides local hostname detection
        "forcehost" : "localhost.localdomain",

        "log.requests" : "/tmp/request.log",
        "log.shares" : "/tmp/shares.log",

        # the server assumes longpolling (w/ SIGUSR1 called for each blk)
        "longpoll.disable" : false,

        # length of time to cache username/password credentials, in seconds
        "auth.cred_cache.expire" : 75,

        # RPC settings
        "rpc.url" : "http://127.0.0.1:8332/",
        "rpc.user" : "bitcoinrpc",
        "rpc.pass" : "bitcoinpassword",

        # rewrite returned 'target' to difficulty-1?
        "rpc.target.rewrite" : true,

        # allow clients to update the ntime field of their work
        "roll.ntime.disable" : false
}
</code></pre>

<p>And finally we get to the database setup:</p>

<pre><code>sqlite3 /tmp/data.sqlite "CREATE TABLE pool_worker (username VARCHAR(32), password VARCHAR(32))"
sqlite3 /tmp/data.sqlite "INSERT INTO pool_worker VALUES ('username', 'password');
</code></pre>

<p>At this point we have created the database and inserted a new user called <code>username</code> and password <code>password</code>. Running <code>sbin/pushpoold -E -F</code> again will start the daemon.</p>

<p>Pointing your miner to <code>http://username:password@127.0.0.1:8336/</code> should get you mining.</p>
