0 permissions
Get Administrator privileges
$ sudo passwd #设置root密码$ su #切换到root用户
1 Basic Tools Preparation
$ apt install git
$ apt install curl
$ apt install python-pip$ pip install --upgrade pip
$ 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
-
- Setting up Docker repositories
$ apt -y install apt-transport-https ca-certificates
-
- 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"
$ apt update
$ apt install docker-ce
$ docker version
2.2 Installing Docker-compose
-
- 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
-
- 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
$ vim /etc/profile
-
- Write Environment variables
# Go environmentexport PATH=$PATH:/usr/local/go/binexport GOPATH=/opt/gopath
Then Esc,:wq Save exit
-
- environment variable in effect
$ source /etc/profile
3.4 View Go version
$ go version
4 Installing node. js
4.1 Installing node
$ apt install nodejs
$ node -v
4.2 Installing NPM
$ apt install npm
-
- Upgrade to the new version
$ npm install -g npm@latest
-
- 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
$ mkdir -p $GOPATH/src/github.com/hyperledger/
$ cd $GOPATH/src/github.com/hyperledger/
5.2
5.2 Download code
$ git clone https://github.com/hyperledger/fabric.git