[ad_1]
Hyperledger Composer is a powerful, open-source blockchain development tool that helps create smart contracts and decentralized applications quickly and easily. It offers a set of pre-built business models, which makes it ideal for developers who want to jump-start their blockchain projects.
// Note
Please be informed that IBM has reduced the size of the team responsible for maintaining Composer, and has decided to allocate more resources towards the development of Hyperledger Fabric; more info here. As a consequence, no new features is being added to Composer going forward, and the project has been discontinued. Nonetheless, the team has committed to ensuring that Composer remains compatible with Fabric 1.x releases.
In this blog post, we will explore the step-by-step process of installing Hyperledger Composer on a Linux VM. We will cover everything we need to know, including the required dependencies, installation of prerequisites, and the actual installation of Hyperledger Composer itself. By following this guide, we’ll be able to set up our own development environment and start creating our own blockchain applications using Hyperledger Composer. So, let’s get started!
- Download Ubuntu Linux 16.04 LTS 64-bit
https://releases.ubuntu.com/xenial/ubuntu-16.04.7-desktop-amd64.iso
Thereafter, Setup & Boot the Machine, in Oracle VM VirtualBox.
For My Machine, the VM Configs were :
- Base Memory: 5120 MB
- Processors: 5
- Video Memory: 128 MB
- Graphics Controller: VMSVGA
- Acceleration: 3D
- SATA Port 0: <vm_name>.vdi (Normal, 45.00 GB)
// Note
If we need to grant a user sudo privileges, we can do so by adding them to the sudoers file. To accomplish this, we can follow these steps:
- Open Terminal. Escalate the privileges to root user using the command
$ sudo su -
- Open the sudoers file with a text editor such as nano or vim. In Ubuntu and Debian, we can do this by running the command
$ sudo visudo
- Locate the section of the file that defines user privileges. This should look something like this:
# User privilege specification
root ALL=(ALL:ALL) ALL
- Add a line below the
root
line with the following syntax:
<username> ALL=(ALL:ALL) ALL
- Save and close the sudoers file.
// Note
Do set locale to en_US.UTF-8 & upgrade the packages, to avoid installation errors. To accomplish the following steps:
- Run the following command in the Terminal
$ sudo update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
$ sudo apt-get update && sudo apt-get upgrade
2. Install Latest Docker Engine & Docker Composer using the following Commands in the Terminal Window
- Update the package list and install the necessary dependencies:
$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
- Run this script along with the commands to install both the Docker Components:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh ./get-docker.sh
$ sudo apt-get install docker-ce
// Note
To check if both the Docker Components has been installed or not, along with their properties, use the following commands
$ docker version
$ docker-compose version
3. Now, install node.js v8.9 & npm v5 using the following Commands in the Terminal Window
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
// Note
To check if both the node.js & npm Components has been installed or not, along with their properties, use the following commands
$ node -v
$ npm -v
4. Then, we need to install Git v2.9 using the following Commands in the Terminal Window
- Add the Git core PPA repository to our system to install a specific version. To add the repository, run the following commands
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
- Once the repository has been added, we can install Git using the following command
$ sudo apt-get install git=2.9.*
// Note
To check if Git Components has been installed or not, along with their properties, use the following command
$ git --version
5. Finally, Python 2.7 is required, comes pre-installed with Ubuntu 16.04 and earlier versions. Still, if we want to proceed with installation, we can use the following Commands in the Terminal Window
$ sudo apt-get install python2.7
// Note
To check if Python Components has been installed or not, along with their properties, use the following command
$ python2.7 --version
After all these being done, we are now finally ready to install Hyperledger Composer. Do a reboot of the system as it ensures all the changes in the system are applied successfully. We can use the following command
$ reboot
//TLDR:
Here is a shorter script by Hyperledger Offcial Website to Install All Pre-requisites at once:
$ sudo su$ curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
$ chmod u+x prereqs-ubuntu.sh
$ ./prereqs-ubuntu.sh
- After logging into the system, we need to install the components necessary for running the Hyperledger Composer first, for which the following Commands are to be executed in the Terminal Window
$ npm install -g [email protected] [email protected] [email protected] [email protected] [email protected]
2. Next, we will install Hyperledger Fabric runtime, which is required to deploy the business networks, using the following Commands in the Terminal Window
$ curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.4.4
That’s it, we are now done will all the installations & stuff. Do reboot once more.
Now, after logging in, to start working on the Hyperledger Composer platform execute the following Terminal Command
$ composer-playground
and head over to
http://localhost:8080/
on our Firefox Browser Window. We will be greeted with this screen
[ad_2]
Source link