Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pedrosimoes79/6d2919a768424c5b3cfcc1e0d862df6c to your computer and use it in GitHub Desktop.
Save pedrosimoes79/6d2919a768424c5b3cfcc1e0d862df6c to your computer and use it in GitHub Desktop.
Bitcoin Core 0.15 on Ubuntu Server 16.04

Ubuntu Server 16.04

  • These steps were made in a Ubuntu Server 16.04 fresh install, but they can also be made on an existing system.
  • The user on these steps is: username: ubuntu, password: ubuntu. Adapt to your system needs.

VirtualBox image with the result of these proceedings

VirtualBox Appliance

hostname: ubuntu
username: ubuntu
password: ubuntu

Change these parameters at start. Don't use the default user and/or password.

GUI for Bitcoin QT (Optional)

sudo apt-get install -y xserver-xorg xorg xfce4

Update & Upgrade the System

sudo update
sudo upgrade
sudo apt-get install git build-essential libtool autotools-dev autoconf pkg-config libssl-dev libboost-all-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev autoconf openssl libssl-dev libevent-dev libminiupnpc-dev -y

Download Bitcoin Source code

cd ~
git clone -b 0.15 https://github.com/bitcoin/bitcoin.git

Bitcoin uses the Berkley DB 4.8

We need to install it as well. Download & Install Berkeley DB

cd ~
mkdir bitcoin/db4/
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
tar -xzvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=/home/ubuntu/bitcoin/db4/
sudo make install

Compile Bitcoin with Berkley DB 4.8

cd ~/bitcoin/
./autogen.sh

Below command ./configure may return with error for dependencies you need to make sure that it returns with no error. If it does please install the dependencies and rerun the /autogen.sh command again and then below command again.

./configure LDFLAGS="-L/home/ubuntu/bitcoin/db4/lib/" CPPFLAGS="-I/home/ubuntu/bitcoin/db4/include/"

below command may take some time based on your system

make

If all went well you will be able to access the binary at below location

cd ~/bitcoin/
./src/bitcoind
./src/bitcoin-qt
./src/bitcoin-cli

Optional: Install it.

sudo make install

If all went well you will be able to access the binaries on your $PATH

bitcoin-cli  bitcoind  bitcoin-qt  bitcoin-tx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment