-
Notifications
You must be signed in to change notification settings - Fork 10
/
install-fabric.sh
executable file
·34 lines (27 loc) · 957 Bytes
/
install-fabric.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
echo " "
echo "===== Download Hyperledger binaries and Docker images ====="
echo " "
mkdir -p ~/go/
cd ~/go/
# curl -sSL http://bit.ly/2ysbOFE | bash -s -- <fabric_version> <fabric-ca_version> <thirdparty_version>
curl -sSL http://bit.ly/2ysbOFE | bash -s -- 1.4.2 1.4.2 0.4.15
# Or only Hyperledger Fabric Docker images v1.4.2
# docker pull hyperledger/fabric-tools:1.4.2
# docker pull hyperledger/fabric-orderer:1.4.2
# docker pull hyperledger/fabric-peer:1.4.2
echo " "
echo "===== Set PATH and GOPATH environment variables ====="
echo " "
echo "## MANUALLY CHANGED
# GOPATH as only 1 dir for Hyperledger Fabric
export GOPATH=\${HOME}/go
# PATH for the Go binary
export PATH=\${PATH}:/usr/local/go/bin
# PATH for the Hyperledger Fabric binaries
export PATH=\${PATH}:\${GOPATH}/fabric-samples/bin" >> ~/.profile
source ~/.profile
echo " "
echo "===== HYPERLEDGER BINARIES AND DOCKER IMAGES SUCCESSFULLY INSTALLED ====="
echo " "