Ubuntu 18.04 Installation Fabric 1.1

Source: Internet
Author: User
Tags gpg install go docker compose

0 permissions

Get Administrator privileges

$ sudo passwd   #设置root密码$ su     #切换到root用户

1 Basic Tools Preparation

    • Git
$ apt install git
    • Curl
$ apt install curl
    • Pip
$ apt install python-pip$ pip install --upgrade pip
    • Vim
$ apt install vim

2 Installing Docker and Docker compose

2.0 Uninstalling older versions

If so, uninstall the old version

$ apt remove docker docker-engine docker.io

2.1 Installing Docker

      1. Setting up Docker repositories
$ apt -y install apt-transport-https ca-certificates
      1. Add a GPG key for Docker and add a warehouse
$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add$ sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
      1. Update APT Package
$ apt update
      1. Installation
$ apt install docker-ce
      1. Docker version
$ docker version

2.2 Installing Docker-compose

      1. Download Docker-compose binaries from github
$ curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose$ chmod +x /usr/local/bin/docker-compose
      1. Check the Docker-compose version
$ docker-compose version

3 Install Go

3.1 Download the installation package

You can go to https://golang.org/dl/to download the latest version of the installation package, the current version is go1.10.3.linux-amd64.tar.gz

3.2 Decompression

$ tar -C /usr/local -zxf go1.10.3.linux-amd64.tar.gz

3.3 Configuring environment variables

      1. Open/etc/profile
$ vim /etc/profile
      1. Write Environment variables
# Go environmentexport PATH=$PATH:/usr/local/go/binexport GOPATH=/opt/gopath

Then Esc,:wq Save exit

      1. environment variable in effect
$ source /etc/profile

3.4 View Go version

$ go version

4 Installing node. js

4.1 Installing node

      1. Installation
$ apt install nodejs
      1. Check version
$ node -v

4.2 Installing NPM

      1. Installation
$ apt install npm
      1. Upgrade to the new version
$ npm install -g npm@latest
      1. Detect version after re-opening terminal
$ npm -v

version 4.3

root@lzj-ThinkCentre-M910t-D562:/# npm -v6.1.0root@lzj-ThinkCentre-M910t-D562:/# node -vv8.10.0

5 Download the Fabric code and Fabric-samples code

5.1 Building a folder directory

      1. New Catalog
$ mkdir -p $GOPATH/src/github.com/hyperledger/
      1. Go to Catalog
$ cd $GOPATH/src/github.com/hyperledger/

5.2

5.2 Download code

      1. Download the Fabric Code
$ git clone https://github.com/hyperledger/fabric.git
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.