๐Ÿ’ปPrerequisite Installation

Before you begin, you should confirm that you have installed all the prerequisites below on the platform where you will be running Hyperledger Fabric.

Install Git

Download the latest version of git if it is not already installed.

sudo apt-get update
sudo apt-get install git

Install cURL

Download the latest version of the cURL tool if it is not already installed or if you get errors running the curl commands from the documentation.

sudo apt install curl

Docker and Docker Compose

You will need the following installed on the platform on which you will be operating, or developing (or for), Hyperledger Fabric:

Set up the repository

  1. Update the apt package index and install packages to allow apt to use a repository over HTTPS:

sudo apt-get update

sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
  1. Add Dockerโ€™s official GPG key:

sudo mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  1. Use the following command to set up the repository:

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Install Docker Engine

  1. Update the apt package index:

sudo apt-get update
  1. Install Docker Engine, containerd, and Docker Compose.

To install the latest version, run:

 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  1. Make sure the docker daemon is running.

sudo systemctl start docker
sudo systemctl enable docker
sudo groupadd docker
sudo usermod -aG docker ${USER}
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
  1. Check if your Hello-World works fine:

sudo docker run hello-world
  1. Install docker-compose and check its version

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

docker-compose --version

Install GoLang

We would need Go-Lang to run chaincodes on Hyperledger Fabric. Let's Install by running the below commands.

sudo wget -c https://dl.google.com/go/go1.19.1.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
export PATH=$PATH:/usr/local/go/bin
source ~/.profile

Let's check the go version.

go version

Install NVM

NVM is a Node Version Manager tool. Using the NVM utility, you can install multiple node.js versions on a single system. You can also choose a specific Node version for applications.

sudo apt-get install build-essential libssl-dev
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile

Install Node and NPM

You can install multiple node.js versions using nvm. And use the required version for your application from installed node.js.

nvm install v14.15.4
nvm use v14.15.4

Let's check Node & Npm Versions

node --version
npm --version

Last updated