Install Hyperledger/Fabric 1.0.2 on Ubuntu 16.04

1. Modify the deb update address

slightly

2. Install docker

sudo apt-get install docker

3. Install curl

sudo apt-get install curl

4. Install go

Download the go installation package

wget https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz

decompress

tar -C /usr/local -xzf go1.9.linux-amd64.tar.gz

See step 5 for environment variable settings.

5. Install nodejs

Download from here https://npm.taobao.org/mirrors/node/

Choose the version at will, I chose the 6.11.3 LTS version here.

cd ~
echo $PWD
/home/johnny
wget https://npm.taobao.org/mirrors/node/v6.11.3/node-v6.11.3-linux-x64.tar.gz
tar -C ~/ -zxf node-v6.11.3-linux-x64.tar.gz

Edit .profile to add nodejs path

vi ~/.profile

added at the end

PATH="/usr/local/go/bin:$HOME/node-v6.11.3-linux-x64/bin:$PATH"
source ~/.profile

6. Set up docker domestic image

vi /etc/default/docker

Increase

DOCKER_OPTS="--registry-mirror=https://docker.mirrors.ustc.edu.cn"

restart docker

sudo service docker restart

7. Download the fabric image

docker pull hyperledger/fabric-orderer:x86_64-1.0.2
docker pull hyperledger/fabric-peer:x86_64-1.0.2
docker pull hyperledger/fabric-zookeeper:x86_64-1.0.2
docker pull hyperledger/fabric-couchdb:x86_64-1.0.2
docker pull hyperledger/fabric-kafka:x86_64-1.0.2
docker pull hyperledger/fabric-ca:x86_64-1.0.2
docker pull hyperledger/fabric-ccenv:x86_64-1.0.2
docker pull hyperledger/fabric-javaenv:x86_64-1.0.2
docker pull hyperledger/fabric-tools:x86_64-1.0.2

docker tag hyperledger/fabric-orderer:x86_64-1.0.2 hyperledger/fabric-orderer:latest
docker tag hyperledger/fabric-peer:x86_64-1.0.2  hyperledger/fabric-peer:latest
docker tag hyperledger/fabric-zookeeper:x86_64-1.0.2 hyperledger/fabric-zookeeper:latest
docker tag hyperledger/fabric-couchdb:x86_64-1.0.2 hyperledger/fabric-couchdb:latest
docker tag hyperledger/fabric-kafka:x86_64-1.0.2 hyperledger/fabric-kafka:latest
docker tag hyperledger/fabric-ca:x86_64-1.0.2 hyperledger/fabric-ca:latest
docker tag hyperledger/fabric-ccenv:x86_64-1.0.2 hyperledger/fabric-ccenv:latest
docker tag hyperledger/fabric-javaenv:x86_64-1.0.2 hyperledger/fabric-javaenv:latest
docker tag hyperledger/fabric-tools:x86_64-1.0.2 hyperledger/fabric-tools:latest

8. Download the fabric project source code

cd /home/johnny/dev/github
git clone https://github.com/hyperledger/fabric.git
  verify:
  git clone https://github.com/hyperledger/fabric-ca.git
   
   
  Execute the following command to build a fabricV1.0 beta network, including: 6 docker images, including 4 peer nodes (peer0, peer1, peer2,
  peer3), an order service node, and a CLI node for executing commands
  cd $GOPATH/src/github.com/hyperledger/fabric
  ./network_setup.sh up
   
  Success signs are as follows:
  ===================== Query on PEER3 on channel 'mychannel' is successful =====================
  ===================== All GOOD, End-2-End execution completed =====================
   
  Relevant node processes can be found through docker ps
   
  Close the fabricV1.0 beta network with the following command
  ./network_setup.sh down 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325483050&siteId=291194637