Ubuntu16.04 mounting Hyperledge Composer (II)

Selected here and the last time is not the same, Composer documents directly in accordance with the installation.
Previous: Ubuntu16.04 installation Hyperledge Composer (a)
Reference: Composer Installation Prerequisites

Prerequisite (and the same on a different installation steps)

-Git: 2.9.x or higher
- Python: 2.7.x
-node: version 8.9 or higher (note does not support the version 9 or above)
-npm: V5.x
-Docker Engine: version 17.03 or later
-Docker-Compose: version 1.8 or later
-node: 8.9 or later (note does not support the version 9 or above)
-npm: V5.x
Note: - log in as a normal user, not by root user Log on.
- When installing the prerequisites, use the curl, and then use sudo unzip.
-Node and npm strictly not use the root user to install.
Note: Unlike a cumbersome on here:
Use the following command to download the necessary software:

curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh

Then run the script - the script briefly due to use sudo in the implementation process, the system prompts you to enter a password.

./prereqs-ubuntu.sh

Reference: Comoposer mounting step

Installation compose-cli

composer-cli contains all command line operations for the development of business networks.

npm install -g composer-cli

8.2 Installation generator-hyperledger-composer

npm install -g generator-hyperledger-composer

Installation composer-rest-server

npm install -g composer-rest-server

In composer-rest-server Hyperledger Composer LoopBack connector is connected to a service network, extraction model, and presents a page, a page containing the model generated by the REST API.

If you are connecting to a business network, use the following command to install Playground run locally.

npm install -g composer-playground
composer-playground   //运行palyground

After the run, will open in the browser http: // localhost: 8080 / login
Screenshot run playground

Start Hyperledger Fabric

Just because a Hyperledger Composer Playground in the local installation, you need to use the following script to close the container.
Note: These commands will terminate and remove all containers that are running, and remove all Hyperledger Fabric chain code image previously created.

docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)

Create a directory and install Hyperledger Fabric Tool

mkdir ~/fabric-tools && cd ~/fabric-tools
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz
tar xvzf fabric-dev-servers.tar.gz

Download running Fabric

./downloadFabric.sh
./startFabric.sh
./createPeerAdminCard.sh

Stop Fabric

./stopFabric.sh

Note: If you run here ./createPeerAdminCard.sh time, an error

can be cleared npm compiled cache, and then upgrading npm, probably because npm version reason;

npm cache clean --force
npm install -g npm 

After restarting Fabric, continue to create PeerAdminCard, may find creating your success.

Released two original articles · won praise 0 · Views 25

Guess you like

Origin blog.csdn.net/qq_43804789/article/details/104799815