Blockchain Tutorials | Hyperledger Fabric Setup

Blockchain Tutorials | Hyperledger Fabric Setup

Most confusing and time taking part in Hyperledger Fabric for beginner is to setup the local environment before jump to development.

Most of the time, people struggle and end up having lot of issues with the installation. This post helps beginners in that regards.

In this post, we will show how to setup Hyperledger Fabric on local environment.

Note: There are lot of challenges to setup Hyperledger Fabric on Windows so we recommend to setup virtual box on windows and then do the installation and same we will show you in this post.

 

What are the main steps in Hyperledger Fabric Installation ?

1. NodeJs Installation
2. Git Installation
3. Python Installation
4. Curl Installation
5. Go Language Installation
6. Docker
7. Clone Fabric Sample
8. Install Platform specific libraries

 

NodeJs Installation

Open the terminal window and run below command. This will start the installation for NodeJs.

sudo apt install nodejs

Run below command to check if Nodejs is successfully installed or not. This should return the version of NodeJs.

node --version

 

Git Installation

Open the terminal window and run below command. This will start the installation for Git.

sudo apt install git

Run below command to check if Git is successfully installed or not. This should return the version of Git.

git --version

 

Python Installation

In the terminal window, run below command to install Python.

sudo apt install python

Verify the installation by running below command and that should return the version of Python.

python --version

 

Curl Installation

Run below command to install Curl.

apt-get install curl

Verify the installation and check the version of Curl using below command.

curl --version

 

Setup Go Language

Now next step is to setup Go language and for that we will run below command.

sudo su

cd $HOME

wget https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz

tar -xvf <file location>

 

Then set required variables using below commands.

mkdir $HOME/gopath
export GOPATH=$HOME/gopath
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin

Verify the installation and check version of Go using below command.

go version

 

Lib Tools Installation

Install Lib tools using below command.

apt-get install libltdl-dev

 

Install Docker CE (Community Edition )

First download and then install it using below commands.

wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_17.06.0~ce-0~ubuntu_amd64.deb

dpkg i <file>

Check the version of docker using below command and this should return the version of docker.

docker --version

You can also run below command to verify the installation/

docker run hello-world

 

Install Docker Compose

Run below commands to setup Docker compose.

apt-get install python-pip

pip --version

pip install docker-compose

Verify the installation and check the version from below command.

docker-compose version

 

Clone the fabric sample

Now next step is to clone the fabric sample that include some of the command file that you need to setup your network and other stuff.

For that run below command.

 

git clone https://github.com/hyperledger/fabric-¬samples.git

Install Platform specific libraries

Last step is to install platform specific libraries and this usually take some time. Run below command for that.

cd fabric-samples
curl -sSL https://goo.gl/6wtTN5 | bash -s 1.1.0

 

 

Inquire Now
close slider