Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install bitcoind on CentOS 6.5

##RPM Packages##

sudo yum install qt-devel protobuff-devel qrencode-devel

##Switch to user bitcoind##

sudo useradd bitcoind
sudo su - bitcoind
mkdir bitcoind
mkdir bitcoind/deps
mkdir bitcoind/downloads

##Berkeley DB 4.8##

cd bitcoind/downloads
wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
tar zxvf db-4.8.30.tar.gz
cd db-4.8.30/build_unix
../dist/configure --prefix=/home/bitcoind/bitcoind/deps --enable-cxx
make && make install

##OpenSSL##

cd /home/bitcoind/bitcoind/downloads
wget https://www.openssl.org/source/openssl-1.0.1g.tar.gz
tar zxvf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
./config --prefix=/home/bitcoind/bitcoind/deps --openssldir=/home/bitcoind/bitcoind/deps/openssl -fPIC shared
make && make install

##Boost##

cd /home/bitcoind/bitcoind/downloads
wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download -O boost_1_55_0.tar.bz2
tar jxvf boost_1_55_0.tar.bz2
cd boost_1_55_0
./bootstrap.sh
./b2 --prefix=/home/bitcoind/bitcoind/deps link=static runtime-link=static install

##Bitcoind##

cd /home/bitcoind/bitcoind/downloads
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin
git checkout v0.9.1 -b v0.9.1
./autogen.sh
LD_LIBRARY_PATH=/home/bitcoind/bitcoind/deps/lib LIBS='-lssl -lcrypto' CPPFLAGS=-I/home/bitcoind/bitcoind/deps/include LDFLAGS=-L/home/bitcoind/bitcoind/deps/lib SSL_CFLAGS=-I/home/bitcoind/bitcoind/deps/include SSL_LIBS=-L/home/bitcoind/bitcoind/deps/lib CRYPTO_CFLAGS=-I/home/bitcoind/bitcoind/deps/include CRYPTO_LIBS=-L/home/bitcoind/bitcoind/deps/lib ./configure --prefix=/home/bitcoind/bitcoind --with-boost=/home/bitcoind/bitcoind/deps
make
LD_LIBRARY_PATH=/home/bitcoind/bitcoind/deps/lib ./src/bitcoind

##References##

@axelay

This comment has been minimized.

Copy link

axelay commented Apr 24, 2014

Thanks that was exactly what I was looking for.
I had to make a slight change to the LIBS because the compiler kept complaining about an issue with clock_gettime:
LIBS='-lssl -lcrypto -lrt'

@nomore85

This comment has been minimized.

Copy link

nomore85 commented Mar 11, 2015

When I try this command:
git clone https://github.com/bitcoin/bitcoin.git
I got error, command not found

@jdrews

This comment has been minimized.

Copy link

jdrews commented Jul 27, 2015

@nomore85: you need git installed.
yum install git

@sapeish

This comment has been minimized.

Copy link

sapeish commented Jul 27, 2015

at first step when isntalling RPM packages, shouldn't protobuff-devel be actually protobuf-devel (only one F)??

@cosmoarunn

This comment has been minimized.

Copy link

cosmoarunn commented Apr 12, 2017

./src/bitcoind: error while loading shared libraries: libdb_cxx-4.8.so: cannot open shared object file: No such file or directory
I followed the some solutions listed here bitcoin/bitcoin#2998
still getting the same.
what to do with this error?

@Perlover

This comment has been minimized.

Copy link

Perlover commented Jun 7, 2017

Hi, All!

I wrote my Makefile with ready solution for CentOS
There is Bitcoin Core 0.14.1 version with UASF enforce-patch
But you can easy to edit other (to original Bitcoin Core) repositary and install your Bitcoin Core

https://github.com/Perlover/bitcoin-uasf-makefile

Best regards, Perlover

@amanshukla0903

This comment has been minimized.

Copy link

amanshukla0903 commented Feb 4, 2018

you might need a package name yum install gcc-c++ while installing this so kindly install this package also

@golife-sysop

This comment has been minimized.

Copy link

golife-sysop commented Aug 16, 2018

Hi @janx : Thanks a lot, this really helps!!! 👍 🙏 I cross-posted your gist with Chinese 🇹🇼 translation, and with some relevant latest updates as well. See : https://gist.github.com/golife-sysop/183571cb28d0a8965a1739c36e92c807 🙂

@MrMebelMan

This comment has been minimized.

Copy link

MrMebelMan commented Nov 19, 2018

Hi @janx, I've refactored this crazy oneliner and moved the configure and bitcoind executions to a separate line.
I hope now it's obvious what the code does :)
I've also added automake package, which satisfies requirements for autogen.sh, and the -y parametr to yum.

My revision is available here, it would be great if you apply them :)

Also, all the software versions here are CRITICALLY outdated. For example, bitcoin's version here is v0.9.1, and latest stable is v0.14.3 😱
Your gist is (was?) very popular, so please update them ASAP

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.