上QQ阅读APP看书,第一时间看更新
How to do it...
To install Hyperledger on AWS, follow these steps:
- Execute the following commands to update the software on your system:
$ sudo apt-get update
- Install curl and the golang software package:
$ sudo apt-get install curl
$ sudo apt-get install golang
$ export GOPATH=$HOME/go
$ export PATH=$PATH:$GOPATH/bin
- Install Node.js, npm, and Python:
$ sudo apt-get install nodejs
$ sudo apt-get install npm
$ sudo apt-get install python
- Install and upgrade docker and docker-compose:
$ sudo apt-get install docker
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg |
sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64]
https://download.docker.com/linux/ubuntu
$(lsb_release -cs) stable"
$ sudo apt-get update
$ apt-cache policy docker-ce
$ sudo apt-get install -y docker-ce
$ sudo apt-get install docker-compose
$ sudo apt-get upgrade
- Let's customize and update Node.js and golang to the proper versions:
$ wget https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz
$ tar -xzvf go1.11.2.linux-amd64.tar.gz
$ sudo mv go/ /usr/local
$ export GOPATH=/usr/local/go
$ export PATH=$PATH:$GOPATH/bin
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
$ sudo apt-get install -y nodejs
- Verify the installed software package versions:
$ curl --version
$ /usr/local/go/bin/go version
$ python -V
$ node -v
$ npm -version
$ docker --version
$ docker-compose --version
The result should look like this:
- Install Hyperledger Fabric 1.3:
$ curl -sSL http://bit.ly/2ysbOFE | sudo bash -s 1.3.0
It will take a few minutes to download the Docker images. When it is done, the results should look like this:
This completes the installation of the Hyperledger Fabric on the AWS EC2 machine. We will build up the network in the next recipe.