DaiDai avatar

Hyperledger Fabric1.0開発環境をUbuntu16.04で作る

daidai

Published: 19 Aug 2018 › Updated: 19 Aug 2018Hyperledger Fabric1.0開発環境をUbuntu16.04で作る

Hyperledger Fabric1.0開発環境をUbuntu16.04で作る

Hyperledger_Fabric_Logo_White.png

■Overview

Hyperledger Fabric とは、IBM 開発を進めているビジネス向けブロックチェーンの一つです。詳しい内容はURLから確認してください。

https://www.ibm.com/developerworks/jp/cloud/library/cl-ibm-blockchain-101-quick-start-guide-for-developers-bluemix-trs/

■Install

以下のコマンドを流してインストールしてみましょう。

・パッケージの更新、および設定
sudo apt-get update
sudo apt-get upgrade
sudo timedatectl set-timezone Asia/Tokyo

・必要なものをインストール
sudo apt install docker.io
sudo apt install docker-compose
sudo apt install curl
sudo apt install git
sudo apt install vim

・dockerの設定
sudo groupadd docker
sudo gpasswd -a ${USER} docker
sudo service docker restart

・go言語のインストール
wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz &&
sudo tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz &&
rm go1.8.3.linux-amd64.tar.gz &&
echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee -a /etc/profile &&
echo 'export GOPATH=$HOME/go' | tee -a $HOME/.bashrc &&
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' | tee -a $HOME/.bashrc &&
mkdir -p $HOME/go/{src,pkg,bin}

・nodejsのインストール
$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo npm install npm@3.10.10 -g

・Linuxディストリビューション用の開発ツールをインストール
sudo apt-get install build-essential git
sudo apt-get install jq git

・hyperledgerのインストール
sudo su
sudo curl -sSL https://goo.gl/byy2Qj | bash -s 1.0.0

■Test

fablic-sampleで環境テストをしましょう。

https://github.com/hyperledger/fabric-samples

・gitからcloneを実行
cd /home/ubuntu/
git clone https://github.com/hyperledger/fabric-samples.git
git checkout release-1.0

・hyperledger networkを起動
cd /home/ubuntu/fabric-samples/first-network
./byfn.sh -m generate

Leave Hyperledger Fabric1.0開発環境をUbuntu16.04で作る to:

Written by

Web系未経験で2018/01からBlockchain関連の会社に転職。ブロックチェーンエンジニアとして活動中の24歳。池袋に生息中。noteで技術記事の投稿、たまにBlockchainのイベントをやってます。ご相談や質問あれば気軽にDMください。マレーチャンいきましょ! #Ethereum #Hyperledger

Read more #hyperledger posts


Best Posts From DaiDai

We have not curated any of daidai's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From DaiDai