current position:Home>Bitcoin series - BTC compilation and installation

Bitcoin series - BTC compilation and installation

2022-02-03 05:27:53 Brick moving leader

(1) Install dependencies

# install libtool、libboost 、libevent、qt、protobuf、libqrencode、libssl
yum install -y boost-devel qt-devel protobuf-devel qrencode-devel libevent-devel libtool openssl-devel 

# install libdb 
 wget ''
 tar -xzf db-5.1.29.NC.tar.gz
 cd db-5.1.29.NC/build_unix/
 ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=/usr/local
 make install

# install boost
tar -xzvf boost_1_64_0.tar.gz
cd boost_1_64_0
./b2 install

(2) Install bitcoin program bitcoind

# from github download 
git clone
cd bitcoin
# Cut to 0.16.0 edition 
git checkout v0.16.0


# Because the front libdb Installation is 5.1 edition , therefore ./configure add  --with-incompatible-bdb Ignore libdb Version difference 
./configure --with-incompatible-bdb --with-boost-libdir=/usr/local/lib
make install
# After compiling and installing , stay /usr/local/bin Inside , There are compiled binary modules  bitcoin-cli bitcoind bitcoin-qt bitcoin-tx 

 View version number 
bitcoind -version

(3) To configure bitcoin.conf

rpc Your account and password are bitcoin.conf File configuration ,v0.16.0 After the version, it seems that this configuration is invalid
The default is in this position , Create it manually vim /home/username/.bitcoin/bitcoin.conf

General startup bitcoind Will pass -datadir Command specifies the path
This situation , It can be created manually to the specified path

Copy the following after creation

# **( Be careful  `regtest` And  `testnet` Parameters ,  The public chain is set to 0; When testing the chain `testnet` Set to 0; Private chain time `regtest` Set to 0)**

# Private chain 
#  Run in the test network , Not in the real bitcoin network 

# Use  DNS  Find node ( Default :1)
# Use global plug and play (UPNP) Map listening ports ( Default :0)

# monitor  < port >  Connections on ( Default :8333, Test network  testnet:18333)  For other bitcoin core To connect it 
# rpcport  After the port is set , It doesn't seem to work , The default port of the public chain is 8332;testnet The default port is 18332;regtest The default port is 18444

# always run a server, even with bitcoin-qt

# enable SSL for RPC server

# Allow from specified  <ip>  Address of the  JSON-RPC  Connect 

# You have to set  rpcuser  and  rpcpassword  In order to ensure that  JSON-RPC  The safety of the 

Past highlights :
Blockchain Knowledge Series
Cryptography series
Zero knowledge proof series
Consensus series
Public chain research series
Bitcoin series
Ethereum series
EOS series
Filecoin series
Alliance chain series
Fabric series
Smart contract series
Token series

copyright notice
author[Brick moving leader],Please bring the original link to reprint, thank you.

Random recommended