Skip to content

Instantly share code, notes, and snippets.

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

##RPM Packages##

sudo yum install qt-devel protobuf-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 0.10 -b 0.10
edit /home/bitcoind/bitcoind/downloads/bitcoin/src/leveldb/helpers/memenv/memenv.h add following at line 5: (this is to avoid SIZE_MAX was not declared in this scope error (see reference 8.)
    #ifndef __STDC_LIMIT_MACROS
    #define __STDC_LIMIT_MACROS
    #endif
./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##

  1. http://btcsec.com/files/other/bitcoin-linuxbuild.pdf
  2. http://www.staff.tugraz.at/michael.steurer/Bitcoin-CentOS5.5-V1.pdf
  3. http://www.boost.org/doc/libs/1_55_0/more/getting_started/unix-variants.html
  4. https://bitcointalk.org/index.php?topic=85228.0
  5. https://bitcointalk.org/index.php?topic=239337.0
  6. https://github.com/bitcoin/bitcoin/issues/3464
  7. http://bitcoinstats.com/irc/bitcoin-dev/logs/2013/11/22
  8. https://bitcointa.lk/threads/bitcoin-core-0-10-0-has-been-released.422213/page-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment