- Hyperledger Cookbook
- Xun (Brian) Wu Chuanfeng Zhang Andrew Zhang
- 254字
- 2021-06-24 14:59:34
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:
![](https://epubservercos.yuewen.com/21D760/19470379601494606/epubprivate/OEBPS/Images/c83dadec-69f3-459b-a8ac-50448180fc75.png?sign=1739124248-RuSjUElRKw0wtKng7KOtaVOd8Z8IjicI-0-b02997dea91ddd488a03bf538de9c771)
- 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:
![](https://epubservercos.yuewen.com/21D760/19470379601494606/epubprivate/OEBPS/Images/67d76c01-5067-40e2-be8c-6841f8518aed.png?sign=1739124248-yqipwSz1hW0dggdWxLfuUkDa3Y0TBfCF-0-c0b809f68cfcf8270b5b89c7eab82d1e)
This completes the installation of the Hyperledger Fabric on the AWS EC2 machine. We will build up the network in the next recipe.