💻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 updatesudo apt-get install gitInstall 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 curlDocker 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
Update the
aptpackage index and install packages to allowaptto use a repository over HTTPS:
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-releaseAdd 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.gpgUse 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/nullInstall Docker Engine
Update the
aptpackage index:
sudo apt-get updateInstall 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-pluginMake 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.sockCheck if your Hello-World works fine:
sudo docker run hello-worldInstall 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 snap install golang --classic
source ~/.profileLet's check the go version.
go versionInstall 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 ~/.profileInstall 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 20
nvm use 20Let's check Node & Npm Versions
node --version
npm --versionLast updated
Was this helpful?