CH

October 21, 2014

Instructions on Building Bitcoin 0.5.3 from Source on Debian 6 (Squeeze)

Filed under: Uncategorized — @ 12:00 a.m.
Instructions on Building Bitcoin 0.5.3 from Source on Debian 6 (Squeeze)

You might have guessed from my last post regarding the utter irrelevance of all work done on "Bitcoin Core" since the 0.5.3 release (and arguably since the wallet encryption fix release, as TXID's aren't terribly important in the ways that most people derping on the topic would like them to be) that I was working on some Bitcoin archaeology1. My research confirms La Serenissima's whispered imperative to never run anything of a later vintage than 0.6.3 and go beyond that to make a strong case against anything past 0.5.3.

In this post, I present a small script (more a set of guidelines, really) that provisions a bitcoind daemon of March 2011 vintage onto a Debian 6 box2:

#!/bin/bash

update_packages() {
    echo "updating system packages, installing bitcoind dependencies"
    sudo apt-get update && sudo apt-get -y upgrade
    sudo apt-get install -y build-essential libssl-dev libdb4.8-dev libdb4.8++-dev libboost-all-dev wget git
}

get_bitcoin() {
    echo "cloning the official bitcoin repository"
    cd ~
    git clone https://github.com/bitcoin/bitcoin
}

build_bitcoind() {
    echo "building bitcoin"
    local tag="$1"
    cd ~/bitcoin/src
    git checkout "$tag"
    sed -i 's/USE_UPNP:=0/USE_UPNP=/1' ./makefile.unix
    make -f makefile.unix
}

install_bitcoind() {
    echo "installing bitcoin"
    sudo cp ~/bitcoin/src/bitcoind /usr/bin/bitcoind
    sudo chmod +x /usr/bin/bitcoind
    ls ~/.bitcoin || mkdir ~/.bitcoin
    cat > ~/.bitcoin/bitcoin.conf << "END"
rpcuser=user
rpcpass=CHANGEME
END
}

start_bitcoind() {
    echo "starting and daemonizing bitcoind"
    bitcoind -daemon -nolisten
}

update_packages
get_bitcoin
build_bitcoind "v0.5.3"
install_bitcoind
start_bitcoind

Script instructions for those who need it:

  • Get (access to) a Debian 6 (aka Squeeze) server
  • Copy the script and dump it onto your drive, naming it five.sh
  • Squirt the script onto the remote machine:
    cat five.sh | ssh you@YOUR_SQUEEZE_BOX
  • Then ssh you@YOUR_SQUEEZE_BOX, and du -h to watch your .bitcoin directory fill up
  • Also, run bitcoind getblocknumber and compare that to the "last block" value shown at any of the popular block explorers to get a notion of how far behind the tip of the blockchain your bitcoind installation is

    I hope you're renting a VPS with enough space…

Things to note:

  • RPC user and password are set to bad values. Hie thee to ~/.bitcoin/bitcoin.conf and change them to sensible ones.
  • The start_bitcoind function handles the -daemon and -nolisten flags, which run the thing in the background and tell it to not listen to the outside world. I'm not entirely certain about how this is implemented, so if you're considering taking a dependency on this approach…look into it yourself. Also, if you run the thing yourself from the command line on your Debian box, remember to pass those flags along - this install does not hold your hand through the SystemV integration: that you'll have to handle yourself.
  • The script is not signed. Conveniently, I'm not a fan of copyright either, so if it passes your personal code review feel free to do whatever with it (including the authorship notice would be nice, though). Just don't come crying to me when this derpy website gets MITM'd and your box gets hosed and the USG runs off with your coins.

So go forth and merrily ruin the day of those who would force their own shitty view of the world onto Bitcoin. Run an old node. Be a hero.

Footnotes:

1

Three years! That's an eternity in Bitcoin!

2

It's really more of a proof of concept than a script. If you want it to run on Ubuntu, well, that's your problem.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Reply

« veh patch: overall improvements --- CORRECTION: multiple channel patches for irc/logbot »