Please visit the installation instructions to ensure you have the correct prerequisites installed. Please use the version of the documentation that matches the version of the software you intend to use to ensure alignment.
Make sure you have installed
- git
- curl
- docker
- docker-compose
- go
- python
- node.js
Note: for setting you working space
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
#working directory $GOPATH/src
cd $GOPATH/src
The installation instructions will utilize prepare.sh
(available in the fabric repository)
script to download all of the requisite Hyperledger Fabric binaries and docker
images, and tag the images with the 'latest' tag. Optionally,
specify a version for fabric, fabric-ca and thirdparty images. If versions
are not passed, the latest available versions will be downloaded.
The script will also clone fabric-samples repository using the version tag that is aligned with the Fabric version.
Note: you need to use proxy for docker hub and git installtion
#your working space should be $GOPATH/src
curl -sSL https://gist.githubusercontent.com/afrouzMashaykhi/026ab4f4aa825915c2c9d30001da43d6/raw/7b8746e11f8c59cc25580f6776d1da1665068925/prepare.sh | bash -s -- 2.0.0 1.4.6 0.4.18
After successfuly installtion you should have list of images that have been installed
Note for running bash you should have proxy for Docker Hub within Iran access Internet.
#copy bins that generated in fabric-samples/bin to go/bin
cp -r $GOPATH/src/fabric-samples/bin $GOPATH/bin
This project setup a cluster of 3 Organizations with Fabric-ca and an orderer with which stores data in couch db.
- Company
- Trader
- Regulator
Working Directory $GOPATH/src/fabric-samples/my-network/
cd $GOPATH/src/fabric-samples/my-network/
# setting up nettwork and generate ca for organizations with couchdb
./network.sh up -s couchdb -ca -verbose
# create channel qith the name of mychannel for the line before
./network.sh up createChannel -c mychannel -verbose
# note: for tear down the network and cleanup containers run this line
sudo ./network.sh down
sudo ./remove.sh
# for more options of your network you can run
./network.sh -help