This is a creation in Article, where the information may have evolved or changed.
Install Go
wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
TAR-XVF go1.8.3.linux-amd64.tar.gz
MV go/usr/local/
Mkdir-p/root/golang
Vim/etc/profile
Export Gopath=/root/golang
Export path= $PATH:/usr/local/go/bin: $GOPATH/bin
Source/etc/profile
To resolve the fabric compilation error: Can ' t load package:package github.com/hyperledger/fabric/peer:open/opt/gopath/src/github.com/ Hyperledger/fabric/peer:permission denied
Ln-s $GOPATH/opt/gopath
Install dependent packages
Apt-get Update
Apt-get install-y libsnappy-dev zlib1g-dev libbz2-dev libltdl-dev libtool
Installing Docker
Curl-fssl https://get.docker.com/| Sh
Install Docker-compose (not available in this section)
Pip Install Docker-compose
Fabric Source Download
git clone https://github.com/hyperledger/fabric $GOPATH/src/github.com/hyperledger/fabric
git clone https://github.com/hyperledger/fabric-ca $GOPATH/src/github.com/hyperledger/fabric-ca
Or
Go get github.com/hyperledger/fabric
Go get Github.com/hyperledger/fabric-ca
Compiling fabric Code
CD $GOPATH/src/github.com/hyperledger/fabric
Make native
Make Docker
CP build/bin/* $GOPATH/bin/
Resolve error during compilation of fabric
Resolved as follows: Package golang.org/x/tools/go/gcexportdata:unrecognized import Path "Golang.org/x/tools/go/gcexportdata"
git clone https://github.com/golang/tools.git $GOPATH/src/golang.org/x/tools
Resolved as follows: Cp:cannot stat ' build/docker/gotools/bin/protoc-gen-go ': No such file or directory
Go get github.com/golang/protobuf/protoc-gen-go
CD $GOPATH/src/github.com/golang/protobuf/
Make all
CD $GOPATH/src/github.com/hyperledger/fabric
CP $GOPATH/bin/protoc-gen-go build/docker/gotools/bin/
Resolved as follows:./scripts/golinter.sh:line 28:goimports:command not found
Apt Install Golang-golang-x-tools
Compiling FABRIC-CA Code
CD $GOPATH/src/github.com/hyperledger/fabric-ca
Make Docker