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.
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-develDownload Bitcoin Core Source
Fetch the 0.18 source archive from the official GitHub repository:
wget https://github.com/bitcoin/bitcoin/archive/0.18.zipExtract 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.18Build and Install Berkeley DB (required for wallet support)
Install additional development libraries:
sudo yum install -y libtool-ltdl-devel gcc openssl-develDownload Berkeley DB 4.8.30:
wget https://download.oracle.com/berkeley-db/db-4.8.30.tar.gzExtract 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 installUpdate the library path:
echo '/usr/local/berkeleydb/lib/' >> /etc/ld.so.conf
ldconfigConfigure 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 installGenerated 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.confTypical 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_dataStart 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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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'.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
