How to compile and install Bitcoin Core on Debian Wheezy

Do you want to use Bitcoin on Linux? This tutorial explains how to install and use Bitcoin Core on Debian Linux. Bitcoin Core is the official Bitcoin Wallet from bitcoin.org. I will use the latest version from the GIT repository at bitcoin.org.

In order to compile and run, Bitcoin Core depends on some other tools which must be installed prior to compiling :

Install some dependencies:

For bitcoin-core

sudo apt-get install build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev

For bitcoin-qt (graphical interface)

If you want the graphical frontend, also install the following dependencies. If you just want bitcoind, you can skip this step.

sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler libqrencode-dev

Installing Berkeley DB 4.8

Compiling Bitcoin Core requires the Berkeley DB version 4.8 which is not available in the wheezy repositories, so we must use squeeze repositories. Note that if you don't need a wallet (i.e. if you want to run a headless Bitcoin node and keep your wallet elsewhere) you can completely skip this section and jump directly to downloading and compiling Bitcoin Core.

1.Change the sources.list to use squeeze repositories

Edit /etc/apt/sources.list :

vi /etc/apt/sources.list

Add the following lines in the head of file :

deb http://[your favorite repository]/debian/ squeeze main contrib non-free
deb-src http://[your favorite repository]/debian/ squeeze main contrib non-free

2.Now you can install Berkeley DB version 4.8 (libdb4.8)

apt-get install libdb4.8++-dev libdb4.8-dev

Downloading and Compiling Bitcoin Core

Go to the branches list on the Bitcoin Core project site (https://github.com/bitcoin/bitcoin/branches), locate the latest version number, and substitute "0.11" in the command below with that.

cd /root git clone -b 0.11 https://github.com/bitcoin/bitcoin.git cd bitcoin/

Configure the system for compilation

./autogen.sh

if you dont need bitcon GUI, use this command :

./configure --without-gui

else use this :

./configure

Note: If you skipped the Berkeley DB 4.8 dependency above because you don't need a wallet, you must add "--disable-wallet" (without the quotation marks) to the end of the line that starts with ./configure above.

Compile

make

Installing and Running Bitcoin Core

make install

After that, you will be able to run Bitcoin Core by typing:

bitcoind (the text based backend)

bitcoin-qt (the graphical frontend)

bitcoin-cli (the command-line client)

Extra

Some useful command lines :

To start bitcoin server as daemon :

bitcoind -daemon

To get a list of accounts on the system :

bitcoin-cli listreceivedbyaddress 0 true

To associate an existing address (here : 1GBykdD628RbYPr3MUhANiWchoCcE52eW2) to an account name :

bitcoin-cli setaccount 1GBykdD628RbYPr3MUhANiWchoCcE52eW2 myfirstaccount

To send bitcoins (here : 0.15) to an address (here : 1AYJyqQHCixxxxxxffevxxxxQosCWqn1bT) :

bitcoin-cli sendfrom myfirstaccount 1AYJyqQHCixxxxxxffevxxxxQosCWqn1bT 0.15

To know if your server is up to date (synchronised) :

echo `bitcoin-cli getblockcount 2>&1`/`wget -O - http://blockchain.info/q/getblockcount 2>/dev/null`
Share this page:

Suggested articles

9 Comment(s)

Add comment

Comments

By: Angristan

Does not work on Debian8 :(

By: Bigcoin

Hi, there's some new dependencies on bitcoin 0.11.2 release that is not listed here :

pkg-configlibtool

 

By: Angristan

The 0.11.2 is included in https://github.com/bitcoin/bitcoin/tree/0.11 ?

By: Priyank

Hello

I'm trying to install but its not possible

Will you help me for installation

Thanking you

By: Chris

> Go to the branches list on the Bitcoin Core project site (https://github.com/bitcoin/bitcoin/branches), locate the latest version number, and substitute "0.11" in the command below with that.

No. For the love of your deity of choice, please don't do this. The branches contain unreleased development code. If you do this, you are building unreleased software that likely contains bugs, and you could lose money as a result.

By: xbtc

you can use bdb 5.1 (install libdb5.1-dev and libdb5.1++-dev and ./configure --with_incompatible_bdb) if you don't have a plan to move bitcoin data to other computer

By: Almir

how may bitcoins im will receive per month ?

By: Indospace.io

You do not receive Bitcoins by running a Bitcoin full node server, as mentioned in this article.  You have to be a miner with expensive hardware or join a cloud miner service and pay money as investment to get a return.

By: UgoChukwu

In general, what is the server recommendation for installing BitCoin core node on debian 8? This includes disc space, bandwidth, memory, etc.

Secondary, any idea if google cloud allows running of bitcoin node on their server?