How To Install Hyperledger Fabric On Ubuntu - TechRepublic
How To Install Hyperledger Fabric On Ubuntu - TechRepublic
DATA CENTERS
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 1/11
12/9/2018 How to install Hyperledger Fabric on Ubuntu - TechRepublic
software cost investment. There is of course a time investment. But this will be time worth
spent.
I want to walk you through the process of installing Hyperledger Fabric v 1.0 on Ubuntu Server
16.04. This is handled completely through the command line. I will assume you already have
your Ubuntu Server 16.04 up and running. You will also need an account with sudo rights.
Now we need to set GOPATH and GOROOT with the following commands:
mkdir $HOME/gopath
export GOPATH=$HOME/gopath
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
Check to make sure golang is working by issuing the command go version. You should see
the version of go you just installed (in our case, 1.10.2).
Install dependencies
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 2/11
12/9/2018 How to install Hyperledger Fabric on Ubuntu - TechRepublic
Next we have a few dependencies to install. The first is libltdl-dev. This can be done with the
single command:
Docker is our next dependencies. We'll install Docker from a downloadable .deb file, with the
commands:
wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-
ce_18.03.1~ce-0~ubuntu_amd64.deb
sudo dpkg -i docker*.deb
sudo apt install -f
Log out and log back in. Verify that Docker is working with the command:
Verify pip has been installed with the command pip —version.
Now we need to add Docker Compose. We will install this, by way of Pip, with the command:
Verify Docker Compose was installed with the command docker-compose —version.
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 3/11
12/9/2018 How to install Hyperledger Fabric on Ubuntu - TechRepublic
Now we install Hyperledger Fabric. Create a new directory with the command:
mkdir -p $GOPATH/src/github.com/hyperledger/
cd $GOPATH/src/github.com/hyperledger/
Change into the fabric directory with the command cd fabric and reset the fabric commit level
with the command:
Make and install fabric with the command make. This will take some time to complete. When
the installation completes, issue the following commands (so our test network will succeed):
You can now run a fabric example by changing into the examples directory with the command
cd examples/e2e_cli/ and then first issuing the command to create a test channel:
./generateArtifacts.sh TESTCHANNEL
Where TESTCHANNEL is the name of a channel (such as testchannel). Next, issue the
command:
Where TESTCHANNEL is the name of your test channel. Near the end of the above command,
you should see END-E2E drawn out in ascii (Figure A).
Figure A
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 4/11
12/9/2018 How to install Hyperledger Fabric on Ubuntu - TechRepublic
You might wind up with errors regarding docker images hyperledger/fabric-tools. To fix this,
you must pull down the latest images from Docker Hub and then retag them. This done with
the following commands:
Once you've issued the above commands, rerun the ./network_setup.sh up command.
Also See
How to install Rancher Docker Container Manager on Ubuntu
(https://www.techrepublic.com/article/how-to-install-rancher-docker-container-manager-on-ubuntu/)
(TechRepublic)
How to fix the Docker and UFW security flaw (https://www.techrepublic.com/article/how-to-fix-the-
docker-and-ufw-security-flaw/) (TechRepublic)
How to monitor your Docker containers with ctop (https://www.techrepublic.com/article/how-to-
monitor-your-docker-containers-with-ctop/) (TechRepublic)
How to get quick stats on your Docker containers (https://www.techrepublic.com/article/how-to-get-
quick-stats-on-your-docker-containers/) (TechRepublic)
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 5/11
12/9/2018 How to install Hyperledger Fabric on Ubuntu - TechRepublic
STORAGE CLOUD
Big Sale on Rolex Watches Up-to 70% off. Sale Ends Soon
Luxury Watch
Forget the most popular programming languages, here's what developers actually use
Raspberry Pi-sized LattePanda Alpha runs Windows 10, offers MacBook-like specs
DOWNLOAD NOW
DOWNLOAD NOW
DOWNLOAD NOW
GET STARTED
DOWNLOAD NOW
EDITOR'S PICKS
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 7/11
12/9/2018 How to install Hyperledger Fabric on Ubuntu - TechRepublic
America's coolest company: How Big Ass Fans went from cooling cows to a multinational tech powerhouse
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 8/11
12/9/2018 How to install Hyperledger Fabric on Ubuntu - TechRepublic
The new commute: How driverless cars, hyperloop, and drones will change our travel plans
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 9/11
12/9/2018 How to install Hyperledger Fabric on Ubuntu - TechRepublic
Big Sale on Rolex Watches Up-to 70% off. Sale Ends Soon
Luxury Watch
SUBSCRIBE
SUBSCRIBE
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 10/11
12/9/2018 How to install Hyperledger Fabric on Ubuntu - TechRepublic
*Investors
Over unique
should
3,75,000 investors^
consult their innancial
this fund.
distributors if in doubt about whether the
product is suitable for them.
Investments In Predominantly
Small-Cap Companies
Mutual Fund investments are subject to market risk, read all scheme related document carefully.
https://www.techrepublic.com/article/how-to-install-hyperledger-fabric-on-ubuntu/ 11/11