Bitcoin Debian mining
Instead of being outdoors I geeked out indoors this weekend and amongst other things installed a Bitcoin daemon on a public facing server so I could have a play with the API/RPC features.
Below I document the steps I followed as it turned out to be slightly more taxing than the usual apt-get install bitcoind
Step 1) Get server
This is obviously optional depending on where it’s going but as I wanted it on a public facing machine and I’ve got a few projects where I need to using it soon I installed a new Debian image on the Rackspace cloud.
The newest version of Debian is ‘squeeze’ so I chose that and as for now this is for testing I chose the cheapest instance, 256MB RAM/10GB space for 24p a day (!) but can change this later if I need more grunt.
Step 2) apt-get install fail
It turns out that bitcoind isn’t in the standard package list for squeeze so you need to install it via back-ports. To do so add the following to your /etc/apt/sources.list
deb squeeze-backports main contrib deb-src squeeze-backports main contrib Save, then run:
apt-get update apt-get install bitcoind Step 3 ) Install start-up & config scripts
Again, surprisingly for a debian package, there’s no start-up or config installed for you. So you’re going to have to do it yourself.
I took the
script found on this forum and edited it as per the thread recommendations with a few tiny mods of my own:
#! /bin/sh ### BEGIN INIT INFO # Provides: bitcoind # Required-Start: $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: bitcoind daemon startup script # Description: bitcoind daemon startup script ### END INIT INFO # Author: Pavel A. Karoukin # # Do NOT "set -e" # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="BitCoin Daemon" NAME=bitcoind DAEMON=/usr/bin/$NAME PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME CHUID=user:group # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>
Source: bealers.com
Related posts: