How to install Hyperledger Fabric on Ubuntu 18.04 with the help of Docker

Hyperledger Fabric is a blockchain framework implementation that works as a foundation for developing applications with a modular architecture. Normally, Hyperledger Fabric is quite difficult to install. And even though the time you invest will be paid off with a powerful tool, you might want an easier method for installing it.

The good news is that there is an easier method of deploying Hyperledger Fabric. That method comes by way of Docker. And because all of the pieces are open source, there’s little to no cost here.

I’m going to walk you through the process of installing Hyperledger Fabric v 1.4.4 on Ubuntu Server 18.04, via the Docker container engine. You’ll use the command line for the entire method, so be prepared to type a bit.

This tutorial assumes you already have an instance of Ubuntu Server 18.04 up and running. You will also need an account with sudo rights.

With that said, let’s deploy this container so you can start developing blockchain applications.

Update and Upgrade

Before we get into the deployment, let’s update and upgrade your Ubuntu server first. It’s important to know that, after upgrading the kernel, you’ll have to reboot the machine (so the updates will take effect).

In order to update and upgrade ubuntu, log into the server and issue the following two commands:

sudo apt-get update

sudo apt-get upgrade -y

Once you complete that, reboot your server (if necessary) and log back in. You’re now ready to start the installation/deployment process. You won’t even need to bring in your third-party outsourcing services to take care of this task.

Installing Docker Engine

The first thing you need to do is install the Docker engine. To do this, issue the command:

sudo apt-get install docker.io -y

Once the installation finishes, start and enable the Docker engine with the commands:

sudo systemctl start docker

sudo systemctl enable docker

Next, you need to add your user to the Docker group. If you don’t do this, you’ll only be able to run the Docker command with sudo, which can lead to security issues. To add your user to the Docker group, issue the command:

sudo usermod -aG docker $USER

In order for the change to take effect, you must log out and log back into your Ubuntu server. To verify your user has permission to use the docker engine, issue the command:

docker ps -a

You shouldn’t get any errors from the command. Instead, you’ll see no docker containers listed (Figure 1).

Deploying the Container

At this point, you are now ready to deploy the Hyperledger Fabric container. This task can be done with a single command. The command is:

curl -sSLhttp://bit.ly/2ysbOFE | bash -s 1.4.4

You can define which version of the framework to deploy. For instance, if you want to deploy the beta version (2.0), you could issue the command:

curl -sSLhttp://bit.ly/2ysbOFE | bash -s 2.0.0

Or if you wanted to deploy an older version, you could issue the command:

curl -sSLhttp://bit.ly/2ysbOFE | bash -s 1.3.0.

To find out what versions are available, check out the official Hyperledger Fabric release page.

You now need to build your first Hyperledger Framework network so the container can be deployed. To do this, change into the newly-created directory with the command:

cd ~/fabric-samples/first-network

Now generate the network with the command:

./byfn.sh generate

Finally, bring the network up with the command:

./byfn.sh up

The final command will take some time to complete. Once it finishes, you can verify it’s actually up and running by issuing the command:

docker ps -a

This time around (Figure 2), you should see the framework has been deployed.

Figure 2

The Hyperledger Framework has been successfully deployed.

Finally, you might want to add the download directory to your $PATH, so you don’t always have to type the full path to the download directory. To do this, issue the command:

export PATH=<path to download location>/bin:$PATH

Where path to download location is the full path to the directory (such as ~/fabric-samples).

When you’re finished, you can bring down the network with the command (run from within the ~/fabric-samples/first-network directory):

./byfn.sh down

Just remember, if you need to work with the framework again, you’ll have to bring the network backup with the command:

./byfn.sh up

Time To Develop

At this point, you can now start developing your first application on your Hyperledger Framework network. To start on your Hyperledger Framework development path, you should read up on the official documentation before diving in.

Related:

Ubuntu 18.04.2 VMs can fail to boot on Citrix Hypervisor (formerly XenServer)

When creating an Ubuntu 18.04.2 or 18.04.3 VM or updating an existing VM to Ubuntu 18.04.2 or 18.04.3, your VM can fail to boot.

The console shows the boot sequence hung at the point “Starting Tool to automatically collect and submit kernel crash signatures…”

If you switch the console to shell mode and log in, the console shows errors in ‘org.gnome.Shell.desktop’

Related:

Sophos Anti-Virus for Linux: System requirements

This knowledge base article lists the system requirements of the Sophos Anti-Virus for Linux for Sophos Central, Sophos Enterprise Console and the standalone versions.

The following sections are covered:

Applies to the following Sophos products and versions

Sophos Anti-Virus for Linux

Sophos Anti-Virus for Linux 10

Sophos Anti-Virus for Linux 10 offers additional capabilities which include Malicious Traffic Detection and Sophos Security Heartbeat™ (applies to Central Server Protection license).

Here is the list of its minimum system requirements:

Sophos Anti-Virus for Linux 9

Sophos Anti-Virus for Linux 9 is the only version available for the standalone and Enterprise Console-managed versions.

Here is the list of its minimum system requirements:

  • Supported Distributions (latest minor point or LTS version):
    • Amazon Linux, Amazon Linux 2
    • CentOS 6/7
    • Debian 9, 10
    • Oracle Linux 6/7
    • Red Hat Enterprise 6/7/8
      • Red Hat Enterprise Linux 6 32-bit version supported until Nov 30th 2020
    • SUSE 12/15
    • Ubuntu 16/18 LTS
  • System type:x86_64
  • Free disk space: 1 GB
  • Free Memory: 1 GB
  • Stack sizes: Non-default stack sizes are not supported.
  • Language version: English and Japanese (EUC and UTF-8). Shift JIS and JIS are not supported.

If you’ve spotted an error or would like to provide feedback on this article, please use the section below to rate and comment on the article.

This is invaluable for us to ensure that we continually strive to give our customers the best information possible.

Related:

Huawei Now Partners with China’s Digital Currency Research Unit

This is the default welcome page used to test the correct operation of the Apache2 server after installation on Ubuntu systems. It is based on the equivalent page on Debian, from which the Ubuntu Apache packaging is derived. If you can read this page, it means that the Apache HTTP server installed at this site is working properly. You should replace this file (located at /var/www/html/index.html) before continuing to operate your HTTP server.

If you are a normal user of this web site and don’t know what this page is about, this probably means that the site is currently unavailable due to maintenance. If the problem persists, please contact the site’s administrator.

Related: