美文网首页
CentOS6.5环境下源代码方式编译安装bitcoin

CentOS6.5环境下源代码方式编译安装bitcoin

作者: 莫名FCJ | 来源:发表于2017-08-30 14:06 被阅读347次

git签出bitcoin最新发布版代码:

安装git:yum -y install git
从github克隆源代码仓库:git clone https://github.com/bitcoin/bitcoin.git
签出最新发布版代码:
  cd bitcoin/
  git tag
  git checkout v0.15.0rc3

安装autoconf\automake\libtool:

安装autoconf(version>=2.64):
  wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
  tar -zxvf autoconf-2.69.tar.gz
  cd autoconf-2.69
  ./configure
  gmake
  gmake install
安装automake:
  wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
  tar -zxvf automake-1.15.tar.gz
  cd automake-1.15
  ./configure
  gmake
  gmake install
安装libtool:
  wget http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz
  tar -zxvf libtool-2.4.6.tar.gz
  cd libtool-2.4.6
  ./configure
  gmake
  gmake install

安装g++\升级gcc支持c++11\安装pkg-config:

安装g++:yum -y install gcc gcc-c++
升级gcc支持c++11:
  wget http://mirrors.ustc.edu.cn/gnu/gcc/gcc-4.8.1/gcc-4.8.1.tar.gz
  tar -zxvf gcc-4.8.1.tar.gz
  cd gcc-4.8.1
  ./contrib/download_prerequisites
  cd ../
  mkdir gcc-build-4.8.1
  cd gcc-build-4.8.1/
  ../gcc-4.8.1/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
  make -j4
  make install
安装pkg-config:
  wget https://pkg-config.freedesktop.org/releases/pkg-config-0.25.tar.gz --no-check-certificate
  tar -zxvf pkg-config-0.25.tar.gz
  cd pkg-config-0.25
  ./configure
  gmake
  gmake install

安装BerkeleyDb:

cd db-4.8.30
cd build_unix/
../dist/configure --prefix=/usr/local --enable-cxx
make
make install

安装boost:

yum install python-devel
下载https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz
tar -zxvf boost_1_64_0.tar.gz
cd boost_1_64_0
./bootstrap.sh
./b2
./b2 install

升级openssl:

wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz
tar -zxvf openssl-1.0.2l.tar.gz
cd openssl-1.0.2l
CFLAGS=-fPIC ./config shared
gmake
gmake install
echo "export PKG_CONFIG_PATH=/usr/share/pkgconfig:/usr/local/ssl/lib/pkgconfig" >> /etc/profile
source /etc/profile
mv /usr/bin/openssl /usr/bin/openssl.bak
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
ln -s /usr/local/ssl/lib/libssl.so /usr/lib64/libssl.so

安装libevent:

下载https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar -zxvf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure
gmake
gmake install
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" >> /etc/profile
source /etc/profile

编译bitcoin源代码:

ACLOCAL_PATH=/usr/local/share/aclocal ./autogen.sh
./configure
gmake
gmake install

相关文章

网友评论

      本文标题:CentOS6.5环境下源代码方式编译安装bitcoin

      本文链接:https://www.haomeiwen.com/subject/ihrtjxtx.html