004 Hyperledger Fabric System Environment construction

Source: Internet
Author: User
Tags zookeeper install node docker compose couchdb hyperledger fabric

The environment required to build the fabric under the ubantu environment.
Configure Ubantu virtual machine under Mac, tutorial can refer to above.
When the Ubantu system is ready, start the environment setup.

Environment construction

Quick Start: http://hyperledger-fabric.readthedocs.io/en/release-1.1/getting_started.html

Premise

Install Git

$ sudo apt update$ sudo apt install git

Installing Curl

$ sudo apt install curl

Install Vim

$ sudo apt install vim

Installing Docker

$ sudo apt update$ docker --version$ sudo apt install docker.io

View Docker version Information

Version 1.12+

$ docker --version

Output:Docker version 1.13.1, build 092cba3

Installing Docker Compose

$ docker-compose --version$ sudo apt install docker-compose

View Dockercompose Version Information

$ docker-compose --version

Output:docker-compose version 1.8.0, build unknown

Golang

Fabric1.1.0 Version Requirements go1.9+

Fabric1.0.0 Version Requirements go1.7+

Upload go1.10.1.linux-amd64.tar.gz

Unzip the file

$ tar -zxvf go1.10.1.linux-amd64.tar.gz

Or

tar -zxvf go1.10.1.linux-amd64.tar.gz -C /usr/local

Edit environment variable File

sudo vim/etc/profile

Add the following content:

Or:

export GOROOT=/usr/local/go
export GOPATH=$HOME/gocodeexport GOROOT=$HOME/goexport PATH=$GOROOT/bin:$PATH
$ source .bashrc$ go versionsour

Or

source /etc/profile

Output:go version go1.10.1 linux/amd64

If you have an older version of Golang in your system, uninstall the old version of Golang using the following command, and then reinstall

$ su -# apt-get remove golang-go --purge && apt-get autoremove --purge && apt-get clean

Installing node and NPM

Install NVM

Install node

$ nvm install v8.11.1

Check node version

$ node -v

Output:v8.11.1

Check NPM version

$ npm -v

Output:5.6.0

Hyperledger Fabric Samples Download installation

Create an empty directory

$ mkdir hyfa

Enter this directory

$ cd hyfa

Download mode:

New File bootstrap.sh

$ vim bootstrap.sh

https://github.com/hyperledger/fabric/blob/master/scripts/bootstrap.shSave the content copy in the exit

Give bootstrap.sh executable permissions and run

$ chmod +x bootstrap.sh

Configuring the Docker Accelerator

The purpose of configuring the Docker accelerator is to speed up the download of the Docker image file

$ curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://8890cb8b.m.daocloud.io

Restarting the Docker service

$ sudo systemctl restart docker.service

Performbootstrap.sh

Determine the network stability, otherwise it will cause a variety of problems, such as downloading to half the network timeout, download failure and so on

$ sudo ./bootstrap.sh 1.1.0

Once the download is complete, review the relevant output and execute the command again if you download a failed image $ sudo ./bootstrap.sh 1.1.0

After the installation is complete, output:

HYPERLEDGER/FABRIC-CA latest 72617B4FA9B4 5 weeks ago 299 Mbhyperledger/fabric-ca x86_64-1 .1.0 72617b4fa9b4 5 weeks ago 299 Mbhyperledger/fabric-tools latest B7BFDDF508BC 5 weeks ago 1 . gbhyperledger/fabric-tools x86_64-1.1.0 B7BFDDF508BC 5 weeks ago 1.46 Gbhyperledger/fabric-orderer L atest ce0c810df36a 5 weeks ago Mbhyperledger/fabric-orderer x86_64-1.1.0 ce0c810df36a 5 weeks A        Go mbhyperledger/fabric-peer latest b023f9be0771 5 weeks ago 187 Mbhyperledger/fabric-peer x86_64-1.1.0 b023f9be0771 5 weeks ago 187 Mbhyperledger/fabric-javaenv Latest 82098abb1a17 5 we Eks ago 1.52 gbhyperledger/fabric-javaenv x86_64-1.1.0 82098abb1a17 5 weeks ago 1.52 gbhyperledger/fabric-c CENV latest c8b4909d8d46 5 weeks ago 1.39 gbhyperledger/fabric-ccenv x86_64-1.1.0 C8b4909d8d4 6 5 weeks ago 1.39Gbhyperledger/fabric-zookeeper latest 92cbb952b6f8 2 months ago 1.39 gbhyperledger/fabric-zookeeper X86_6    4-0.4.6 92cbb952b6f8 2 months ago 1.39 Gbhyperledger/fabric-kafka latest 554c591b86a8 2 months ago     1.4 Gbhyperledger/fabric-kafka x86_64-0.4.6 554c591b86a8 2 months ago 1.4 Gbhyperledger/fabric-couchdb Latest 7e73c828fc5b 2 months ago 1.56 gbhyperledger/fabric-couchdb x86_64-0.4.6 7e73c828fc5b 2 mont HS ago 1.56 GB

Adding environment variables

$ export PATH=<path to download location>/bin:$PATH

Note: <path to download location> indicates the fabric-samples path where the downloaded file directory is located

例:  $ export PATH=$HOME/hyfa/fabric-samples/bin:$PATH

HyperLedger FabricEnvironment Construction Completed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.