安装
apt install unzip
apt install make
apt-get install openssl
apt-get install libssl-dev
apt-get install python
python --version
在/usr/local/下,tar -zxvf go1.13.5.linux-amd64.tar.gz
#在/usr/local/下,tar -zxvf node-v12.14.1.tar.gz
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
apt-get install nodejs
vi /etc/profile
#go
export GOROOT=/usr/local/go
export GOPATH=${GOROOT}/gopath
export PATH=${GOROOT}/bin:$PATH
#nodejs
export NODEJS_HOME=/usr/local/nodejs
export PATH=${NODEJS_HOME}/bin:$PATH
source /etc/profile
go version 和 go env
node -v
mkdir -p /usr/local/go/gopath/src/github.com/hyperledger
unzip fabric-master.zip
unzip fabric-samples-master.zip
复制/usr/local/go/gopath/src/github.com/hyperledger/fabric-master/scripts/bootstrap.sh到/usr/local/go/fabricinstall
chmod +x /usr/local/go/fabricinstall/bootstrap.sh
/usr/local/go/fabricinstall/./bootstrap.sh
启动
/usr/local/go/gopath/src/github.com/hyperledger/fabric-samples/first-network
生成网络标识
./byfn.sh –m generate
启动网络
./byfn.sh –m up
关闭网络
./byfn.sh –m down