Instructions Installation Hyperledger Fabric On Ubuntu 16.04 LTS
Instructions Installation Hyperledger Fabric On Ubuntu 16.04 LTS
Instructions Installation Hyperledger Fabric On Ubuntu 16.04 LTS
04 LTS
https://medium.com/@eSizeDave/https-medium-com-esizedave-how-to-install-hyperledger-fabric-1-2-
on-ubuntu-16-04-lts-ecdfa4dcec72
Install curl and packages to setup Docker repository for the usual Docker
install method
See https://docs.docker.com/install/linux/docker-
ce/ubuntu/#install-docker-ce for more details on this… if you
really want to.
docker –version
Docker version 18.09.3, build 774a1f4
Download Docker Compose
sudo curl -L
https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$
(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
*** THIS DID NOT WORK, I had to install and then use pip instead
docker-compose –version
docker-compose version 1.23.2, build 1110ad0
sudo mv go /usr/local
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
Update the package index again and install necessary Ubuntu packages
for Node.js
cd /usr/local/src
sudo mkdir node
cd node
pwd
dbpract@silver0:/usr/local/src/node$
Download Node.js
--- this make command will take a long time to run -- wow
sudo make
sudo make install
Be warned. The sudo make command above for node.js took more than 45 minutes to run.
Check Node.js versions to ensure it’s installed
node --version
Upgrade NPM version
(as per instructions on http://hyperledger-fabric.readthedocs.io/en/release-
1.2/prereqs.html and check it’s correct)
5.6.0
Python 2.7x
Python 2.7.12 should already be installed on a fresh Ubuntu 16.04 LTS, but just in case,
install Python (ensure we’re only using version 2.7x and not Python 3)
python --version
Python 2.7.12
You can create a hyperledger directory in /usr/local/ and go into it to run the following
commands which create a fabric-samples directory and installs them there
cd /usr/local
sudo mkdir hyperledger
cd hyperledger
remote: Total 2718 (delta 0), reused 5 (delta 0), pack-reused 2713
Receiving objects: 100% (2718/2718), 928.82 KiB | 0 bytes/s, done.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
If you want to create a new branch to retain commits you create, you may
==> Done.
==> Done.
Digest: sha256:949b38bad9496d7694b54d30b90b72653804d761a44d721c4dc7a16a5cbcabe8
Digest: sha256:a10f6d1d4cbb5a0264634c8b5ec63ff6cbbfc7c9fb369a06cc6dfe504d976259
Digest: sha256:0a7fb37111cafce79cf89ca8d1af5ca6f721e60a8bd1b2b93521e671e3348af2
Digest: sha256:24cca44a2f2ab6325c6ccc1c91a10bd3e0e71764037a85a473f7e9621b3a0f91
Digest: sha256:c1dce534d9e9202697e0aaad7c5521d958700fda0b05127dafb9333c22e15f74
Digest: sha256:021c7e4a5047432d892fbdf7d5220d3049ff4e8b436fd481bb08e41871f1aac7
Status: Downloaded newer image for hyperledger/fabric-couchdb:0.4.14
Digest: sha256:82ac81938320d05a538b9fd6de0fcd54b5a999188cf9b08822cf25f9ad7970a9
Digest: sha256:ac342ed87997175bfd557c53f7ffc6e0f8aa32bcaebb54a9bd55fb4c7f954802
dbpract@silver0:/usr/local/hyperledger$ ls -l
total 4
dbpract@silver0:/usr/local/hyperledger$
At this point we will verify that the fabric-samples has something in it. Change directory into
the directory and use the ls to list the files and directories.
cd fabric-samples
ls
Edit the profile and add in the export path shown below.
sudo vi ~/.profile
export PATH=/usr/local/hyperledger/fabric-samples/bin:$PATH
source ~/.profile
cd /path/to/fabric-samples/first-network so in our case:
cd /usr/local/hyperledger/fabric-samples/first-network
sudo ./byfn.sh generate
dbpract@silver0:~$ cd /usr/local/hyperledger/fabric-samples/first-network
Generating certs and genesis block for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] Y
proceeding ...
/usr/local/hyperledger/fabric-samples/first-network/../bin/cryptogen
##########################################################
##########################################################
org1.example.com
org2.example.com
+ res=0
+ set +x
/usr/local/hyperledger/fabric-samples/first-network/../bin/configtxgen
##########################################################
##########################################################
2019-03-19 13:23:38.806 MDT [common/tools/configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen is deprecated.
Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'.
2019-03-19 13:23:38.806 MDT [common/tools/configtxgen] main -> INFO 002 Loading configuration
2019-03-19 13:23:38.816 MDT [common/tools/configtxgen/encoder] NewChannelGroup -> WARN 003 Default policy emission is deprecated,
please include policy specificiations for the channel group in configtx.yaml
2019-03-19 13:23:38.816 MDT [common/tools/configtxgen/encoder] NewOrdererGroup -> WARN 004 Default policy emission is deprecated,
please include policy specificiations for the orderer group in configtx.yaml
2019-03-19 13:23:38.817 MDT [common/tools/configtxgen/encoder] NewOrdererOrgGroup -> WARN 005 Default policy emission is
deprecated, please include policy specificiations for the orderer org group OrdererOrg in configtx.yaml
2019-03-19 13:23:38.819 MDT [msp] getMspConfig -> INFO 006 Loading NodeOUs
2019-03-19 13:23:38.819 MDT [common/tools/configtxgen/encoder] NewOrdererOrgGroup -> WARN 007 Default policy emission is
deprecated, please include policy specificiations for the orderer org group Org1MSP in configtx.yaml
2019-03-19 13:23:38.819 MDT [msp] getMspConfig -> INFO 008 Loading NodeOUs
2019-03-19 13:23:38.819 MDT [common/tools/configtxgen/encoder] NewOrdererOrgGroup -> WARN 009 Default policy emission is
deprecated, please include policy specificiations for the orderer org group Org2MSP in configtx.yaml
2019-03-19 13:23:38.819 MDT [common/tools/configtxgen] doOutputBlock -> INFO 00a Generating genesis block
2019-03-19 13:23:38.820 MDT [common/tools/configtxgen] doOutputBlock -> INFO 00b Writing genesis block
+ res=0
+ set +x
#################################################################
#################################################################
2019-03-19 13:23:38.874 MDT [common/tools/configtxgen] main -> INFO 001 Loading configuration
2019-03-19 13:23:38.883 MDT [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2019-03-19 13:23:38.883 MDT [common/tools/configtxgen/encoder] NewApplicationGroup -> WARN 003 Default policy emission is
deprecated, please include policy specificiations for the application group in configtx.yaml
2019-03-19 13:23:38.884 MDT [msp] getMspConfig -> INFO 004 Loading NodeOUs
2019-03-19 13:23:38.885 MDT [common/tools/configtxgen/encoder] NewApplicationOrgGroup -> WARN 005 Default policy emission is
deprecated, please include policy specificiations for the application org group Org1MSP in configtx.yaml
2019-03-19 13:23:38.886 MDT [msp] getMspConfig -> INFO 006 Loading NodeOUs
2019-03-19 13:23:38.886 MDT [common/tools/configtxgen/encoder] NewApplicationOrgGroup -> WARN 007 Default policy emission is
deprecated, please include policy specificiations for the application org group Org2MSP in configtx.yaml
2019-03-19 13:23:38.888 MDT [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 008 Writing new channel tx
+ res=0
+ set +x
#################################################################
#################################################################
2019-03-19 13:23:38.942 MDT [common/tools/configtxgen] main -> INFO 001 Loading configuration
2019-03-19 13:23:38.952 MDT [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2019-03-19 13:23:38.952 MDT [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
+ res=0
+ set +x
#################################################################
#################################################################
2019-03-19 13:23:39.008 MDT [common/tools/configtxgen] main -> INFO 001 Loading configuration
2019-03-19 13:23:39.020 MDT [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2019-03-19 13:23:39.020 MDT [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
+ res=0
+ set +x
https://www.hyperledger.org/community/basics
https://hyperledger-fabric.readthedocs.io/en/release-1.4/write_first_app.html#