Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jimmysitu/8d3dde53a9a031eb7db9 to your computer and use it in GitHub Desktop.
Save jimmysitu/8d3dde53a9a031eb7db9 to your computer and use it in GitHub Desktop.
# Install bitcoind
## build bitcoind
mkdir -p ~/source; cd ~/source
wget https://github.com/bitcoin/bitcoin/archive/v0.9.2.tar.gz
tar zxvf v0.9.2; cd bitcoin-0.9.2
## open-nodes.org_hub-v0.9.2.patch
wget https://gist.githubusercontent.com/bitkevin/a1b4a556fffce6fc527a/raw/ -O open-nodes.org_hub-v0.9.2.patch
patch -p1 < open-nodes.org_hub-v0.9.2.patch
## make
./autogen.sh
./configure --without-miniupnpc --disable-wallet
make -j4
strip src/bitcoind
cp src/bitcoind /usr/local/bin/bitcoind-0.9.2
cd /usr/local/bin
ln -s ./bitcoind-0.9.2 bitcoind
cd ~/source
## setup bitcoind
# `/d1/bitcoind` is the home dir for bitcoind.
mkdir -p /d1/bitcoind/
useradd bitcoind
chown bitcoind.bitcoind /d1/bitcoind
su - bitcoind
echo 'rpcuser=opennodesorg
rpcpassword=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
rpcthreads=32
rpcallowip=*
datadir=/d1/bitcoind
txindex=true
limitdownloadblocks=2016
maxconnections=4096
outboundconnections=3072
' > /d1/bitcoind/bitcoin.conf
### _Don't forget to change **rpcpassword**_. ###
## supervise for bitcoind
mkdir ~/supervise_bitcoind
cd ~/supervise_bitcoind
touch run
chmod +x run
echo '#! /bin/sh
SROOT=$(cd $(dirname "$0"); pwd)
cd $SROOT
bitcoind -conf=/d1/bitcoind/bitcoin.conf
' > run
## start bitcoind
# cd ~/
# nohup supervise supervise_bitcoind/ &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment