- Login as a normal user, rather than root.
- Do not su to root.
- When installing prerequisites, use curl, then unzip using sudo.
- Run prereqs-ubuntu.sh as a normal user. It may prompt for root password as some of it's actions are required to be run as root.
- Do not use npm with sudo or su to root to use it.
- Avoid installing node globally as root.
curl -O https://hyperledger.github.io/composer/v0.19/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
./prereqs-ubuntu.sh
npm install -g composer-cli@0.19
2. Utility for running a REST Server on your machine to expose your business networks as RESTful APIs:
npm install -g composer-rest-server@0.19
npm install -g generator-hyperledger-composer@0.19
npm install -g yo
npm install -g composer-playground@0.19
Whilst the browser app can be used to work on your Business Network code, most users will prefer to work in an IDE. Our favourite is VSCode, because a Composer extension is available.
Install VSCode from this URL: https://code.visualstudio.com/download
Open VSCode, go to Extensions, then search for and install the Hyperledger Composer extension from the Marketplace.
1. This step gives you a local Hyperledger Fabric runtime to deploy your business networks to. In a directory of your choice (we will assume ~/fabric-dev-servers), get the .tar.gz file that contains the tools to install Hyperledger Fabric:
mkdir ~/fabric-dev-servers && cd ~/fabric-dev-servers
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz tar -xvf fabric-dev-servers.tar.gz
*A zip is also available if you prefer: just replace the .tar.gz file with fabric-dev-servers.zip and the tar -xvf command with a unzip command in the preceding snippet.
2. Use the scripts you just downloaded and extracted to download a local Hyperledger Fabric v1.1 runtime:
cd ~/fabric-dev-servers export FABRIC_VERSION=hlfv11 ./downloadFabric.sh
The first time you start up a new runtime, you'll need to run the start script, then generate a PeerAdmin card:
cd ~/fabric-dev-servers
export FABRIC_VERSION=hlfv11
./startFabric.sh
./createPeerAdminCard.sh
The easiest way to install the most recent LTS version of Node 10.x is to use the package manager to get it from the Ubuntu binary distributions repository. This can be done very simply by running the following two commands on your terminal:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
- Warning: Don't install directly from the normal Ubuntu repositories because they contain very old versions of node.
node -v
v10.16.0 (this line depends on your version)
npm -v
6.9.0 (this line depends on your version)
npm install eslint --save-dev
cd fabric-dev-servers
./startFabric.sh
4. go to the hyperledger-construction-management file and type following commands for bringing up hyperledger composer. All commands could be found in the /hyperledger-construction-management/commands
1. In the /hyperledger-construction-management directory use following command to start hyperledger composer server:
composer-rest-server
admin card: admin@hyperledger-construction-management
Go to localhost/3000/explorer
3. Unzip the blockchain-construction-management.zip inside your created foler in the former step (study-node folder)
npm install
5. Find the content in the /blockchain-construction-management/project-infor for starting command of web:
Go to form to create a commercial manager, input information and submit to hyperledger blockchain:
Go to commercial manager list to check commercial manager:
Go to Hyperledger Composer to check whether or not information of commercial manager is created