Blockchain 6 min read

Step-by-Step Guide to Install Bitcoin Core 0.18 on Linux

This tutorial walks you through installing Bitcoin Core 0.18 on a Linux server, covering prerequisite packages, downloading and extracting the source code, building Berkeley DB, configuring and compiling the client, creating a configuration file, and starting or stopping the daemon.

Senior Brother's Insights
Senior Brother's Insights
Senior Brother's Insights
Step-by-Step Guide to Install Bitcoin Core 0.18 on Linux

Install Prerequisite Packages

Run the following command to install development tools required by Bitcoin Core:

sudo yum install -y autoconf automake libtool libdb-devel boost-devel libevent-devel

Download Bitcoin Core Source

Fetch the 0.18 source archive from the official GitHub repository:

wget https://github.com/bitcoin/bitcoin/archive/0.18.zip

Extract the Archive

If unzip is not available, install it first: yum install unzip Then unzip the source package and enter the directory:

unzip 0.18.zip
cd bitcoin-0.18

Build and Install Berkeley DB (required for wallet support)

Install additional development libraries:

sudo yum install -y libtool-ltdl-devel gcc openssl-devel

Download Berkeley DB 4.8.30:

wget https://download.oracle.com/berkeley-db/db-4.8.30.tar.gz

Extract and compile it:

tar xvzf db-4.8.30.tar.gz -C /usr/local/src/
mkdir /usr/local/berkeleydb
cd /usr/local/src/db-4.8.30/build_unix
../dist/configure --prefix=/usr/local/berkeleydb --enable-cxx
make && sudo make install

Update the library path:

echo '/usr/local/berkeleydb/lib/' >> /etc/ld.so.conf
ldconfig

Configure and Compile Bitcoin Core

Run the autotools script to generate configure: ./autogen.sh Configure the build, pointing to the Berkeley DB libraries:

./configure LDFLAGS="-L/usr/local/berkeleydb/lib/" CPPFLAGS="-I/usr/local/berkeleydb/include/"

If the configure step fails with a C++ compiler error, install GCC C++: yum install gcc-c++ If it reports missing libdb_cxx headers, ensure Berkeley DB was built correctly.

Compile and install:

make
sudo make install

Generated Executables

bench_bitcoin – checks for cryptographic algorithm updates.

bitcoin-cli – full‑featured RPC client.

bitcoind – the core daemon (Bitcoin Core).

bitcoin-tx – transaction creation and inspection tool.

bitcoin-wallet – wallet management utility.

test_bitcoin – test suite for various modules.

Create Configuration File

Make a hidden .bitcoin directory in your home folder and create bitcoin.conf:

mkdir -p ~/.bitcoin
touch ~/.bitcoin/bitcoin.conf

Typical configuration content:

# Accept JSON‑RPC requests
server=1
# Run as a daemon
daemon=1
rpcuser=testuser
rpcpassword=123456
rpcallowip=127.0.0.1
rpcport=8332
datadir=/mnt/btc_data

Start and Stop the Daemon

Start Bitcoin Core using the configuration file: bitcoind -conf=~/.bitcoin/bitcoin.conf Or simply run bitcoind if the config file is in the default location.

Stop the daemon: bitcoin-cli stop Log output is written to debug.log inside the data directory specified by datadir.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxInstallationBlockchainBitcoinCoreBerkeleyDB
Senior Brother's Insights
Written by

Senior Brother's Insights

A public account focused on workplace, career growth, team management, and self-improvement. The author is the writer of books including 'SpringBoot Technology Insider' and 'Drools 8 Rule Engine: Core Technology and Practice'.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.