This post explains how to setup Hyperledger Fabric 2.2 on Linux operating system.
Before you install Hyperledger Fabric, you need to do prerequisites setup where you will install
Curl , NodeJs, Git, Python, Go Language, Libtool, Docker CE & Docker Compose
curl --version
Run below command to check if Git is successfully installed or not. This should return the version of Git.
Step 1: Very first step is to download the installer, for that go to https://golang.org/ site. Click on "Download Go" button and that should take you to next page.
Step 2: Click on Linux tar file which is Linux installer and that should download the installer for you.
Step 3: First untar the downloaded file. Since the file is downloaded in Downloads folder so first you need to go to that folder and then run below command.
sudo tar -xvf go1.13.4.linux-amd64.tar.gz
Step 4: You should be able to see newly created "go" folder under Downloads folder, to verify that run "ls" command.
Step 5: Move the go folder from Downloads to /usr/local folder using below command.
Step 6: Next step is to set few variables and update the PATH variables. There are two ways to do that.
First way is to set is temporary and second way is to set permanent variables so that you need not to do the same steps again and again.
If you want to go with first step then follow below steps.
cd $HOME
mkdir gowork
export GOPATH=$HOME/gowork
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:$GOPATH/bin
If you want to go with second step
which I recommend then follow below steps.
go to home location and press " ctrl+H" to see the hidden files
open .profile file and add below entries
GOROOT=/usr/local/go
GOPATH=$HOME/gowork
Update
the PATH variable to append both GOROOT and GOPATH bin folders and your PATH
variable should look like below.
Install
Lib tools using below command.
Download and install it using below commands.
wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_17.06.2~ce- 0~ubuntu_amd64.deb
sudodpkg -i<file>
docker --version
sudo apt-get install python-pip
pip --version
sudo pip install docker-compose
One you perform all above prerequisites then you need to perform below steps to complete fabric 2.2 setup.
Run below command to download and setup Fabric.
curl -sSL https://bit.ly/2ysbOFE | bash -s
You may encounter below issue when you run above command.
failed
to get default registry endpoint from daemon (Got permission denied while
trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:
To fix this you need run below command.
sudo chmod 666 /var/run/docker.sock
After running this command, run the command that is
mentioned in previous step again and you should be able to download and setup
on your system.
0 comments :
Post a Comment