0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

BlockSci環境構築(ローカル編)

Last updated at Posted at 2018-01-17

こちらの記事のローカル編です。
自分のPCがOS X High Sierraですが、gcc g++周りがLinuxと違う影響やその他諸々でうまくいっていません。
もし環境構築に成功された方がいらしたら情報提供、もしくはQiitaに記事をあげていただけると幸いです。
データ解析についてはBlockSciデータ解析編に書いてあります。

インストール

推奨環境のUbuntu 16.04を使ってやっていきます。
公式ドキュメントとほぼ同じですが公式にはまだ載っていない内容も多少混ざってますのでご注意ください。

sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt install build-essential cmake libssl-dev libboost-all-dev libsqlite3-dev autogen \
autoconf libcurl4-openssl-dev libjsoncpp-dev libjsonrpccpp-dev libjsonrpccpp-tools \
python3-dev python3-pip liblmdb-dev libsparsehash-dev libargtable2-dev libmicrohttpd-dev \
libhiredis-dev libjsoncpp-dev catch gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7

git clone https://github.com/bitcoin-core/secp256k1
cd secp256k1
./autogen.sh
./configure --enable-module-recovery
make
sudo make install

cd ~
wget https://cmake.org/files/v3.10/cmake-3.10.0.tar.gz
tar xzf cmake-3.10.0.tar.gz
cd cmake-3.10.0/
cmake .
make
sudo make install
exec bash

cd ~
git clone https://github.com/rescrv/HyperLevelDB
cd HyperLevelDB
autoreconf -i
./configure
make
sudo make install
sudo ldconfig

cd ~
git clone https://github.com/citp/BlockSci.git
cd BlockSci
git submodule init
git submodule update --recursive
sudo cp -r libs/range-v3/include/meta /usr/local/include
sudo cp -r libs/range-v3/include/range /usr/local/include

cd libs/bitcoin-api-cpp
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install

cd ../../..
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install

# 公式に載っていないインストールコマンド
cd clustering
mkdir release #ディレクトリがない場合に実行
cd release
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
# ここまで

sudo -H pip3 install --upgrade pip
sudo -H pip3 install --upgrade multiprocess psutil jupyter pycrypto matplotlib pandas dateparser

clusterを生成するコマンドのインストールがReadmeに載っていないのですが2017/12/21 時点でプルリクエストが出されているので時期に公式に載るかもしれません。

bitcoindのインストール

インストールディレクトリは各自で決めてください。

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin
./autogen.sh
./configure
make
sudo make install

以上でインストールは終了です。

参考URL

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?