sudo apt-get update
sudo apt-get install ssh
Go源碼下載 選擇對應的平臺下載。linux
在下載的位置打開 terminal 。git
sudo tar -zxvf goxxxxx.tar.gz -C /usr/local
, 建議 /usr/local
位置安裝。github
sudo gedit /etc/profile
, 追加如下配置到環境變量。golang
export GOROOT=/usr/local/go export GOPATH=~/code/go
save and exit.docker
source /etc/profile
當即適應新環境bootstrap
輸入 go version
,成功查看版本信息雜表示配置成功。ubuntu
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-get update
bash
sudo apt-get install docker-ce
app
sudo usermod -aG docker bey
ssh
docker run hello-world
,正確輸出結果以下:
Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/
sudo curl -L https://github.com/docker/compose/releases/download/1.24.0-rc1/docker-compose-
uname -s-
uname -m -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose -v
go get github.com/hyperledger/fabric
,若是 go get 命令沒法執行,再試試 Gitmkdir -p $GOPATH/src/github.com/hyperledger/
,進入目錄 cd $GOPATH/src/github.com/hyperledger/
git clone https://github.com/hyperledger/fabric.git
,下載完成後,進入 fabric 文件夾git checkout v1.4.0
cd $GOPATH/src/github.com/hyperledger/fabric/scripts
./bootstrap.sh
該腳本運行時間較長,主要是在下載 fabrice 各個組件的 docker 鏡像
cd $GOPATH/src/github.com/hyperledger/fabric/scripts/fabric-samples/bin
sudo cp -r . /usr/local/bin
這樣就能夠處處使用 fabric-tools 了。
cd $GOPATH/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network
./byfn.sh down
./byfn.sh up
看到以下信息表示部署成功,恭喜!
========= All GOOD, BYFN execution completed =========== _____ _ _ ____ | ____| | \ | | | _ \ | _| | \| | | | | | | |___ | |\ | | |_| | |_____| |_| \_| |____/