Environment configuration:
Git
GO
Docker
Download the Vagrant tool and install: https://www.vagrantup.com/downloads.html
Download Vitualbox and install, run: Http://sw.bos.baidu.com/sw-search-sp/software/6bda11b7d3256/VirtualBox-5.1.30.18389-Win.exe
Steps:
1. Configuring the Go locale, Fabric uses go language development
$GOROOT is the Go install directory
$GOPATH is a custom directory
Build the Src,bin,pkg directory under the Gopath directory and create the Github.com\hyperledger directory under the SRC directory
2. Enter the $GOPATH \src\github.com\hyperledger, execute:
git clone https://github.com/hyperledger/fabric.git
Enter $GOPATH \src\github.com\hyperledger\fabric, execute:
git checkout v1.0.3
3. Enter the $GOPATH \src\github.com\hyperledger\fabric\devenv, execute: Vagrant.exe up (this process is long, and there may be a lot of problems, wait patiently)
Like what:
Under $GOPATH \src\github.com\hyperledger\fabric\devenv, vagrant.exe up is executed, Vagrantfile is executed first, setup.sh is called in Vagrantfile.
In the setup.sh
When using the Apt-get command to download, there is usually no Mac on this command, the following is the workaround: HTTPS://WWW.JIANSHU.COM/P/8120C4F1B6A6
Package golang.org/x/tools/go/gcexportdata:unrecognized Import Path "Golang.org/x/tools/go/gcexportdata" (https Fetch:get Https://golang.org/x/tools/go/gcexportdata?go-get=1:net/http:TLS handshake Timeout) makefile:47:recipe For target ' Gotool.golint ' failed
Generally encountered this problem is in $GOPATH\SRC under the lack of golang.org, download good golang.org
Then copy to the $gopath\src\github.com\hyperledger\fabric\gotools\src folder and execute the VAGR
4. Enter the virtual machine environment: Vagrant.exe SSH
5. Download the official Fabric Docker