前言
提示:本文主要是基本環境安裝配置
系統是Ubuntu18.04,準備部署的是hyperledge fabric 2.0,
本文主要要安裝的東西及版本有:
- curl:版本7.58.0
- docker:版本19.03.6
- docker-compose:版本1.17.1
- golang:版本1.15.2
一、更換國內源
在安裝相關軟體之前先更換國內源
首先安裝下vim
sudo apt-get update && sudo apt-get install vim
打開sources.list洗掉原本的內容,然后切換成國內源
sudo vim /etc/apt/sources.list
這里我們切換成阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
保存退出,然后更新下
sudo apt-get update
sudo apt-get upgrade
二、基本環境安裝
1.curl安裝
執行以下命令完成curl的安裝:
sudo apt install -y curl
查看安裝結果
curl -V
如下圖所示,顯示安裝成功,

2.安裝docker
sudo apt install docker.io
查看docker版本
docker --version
這里版本為19.03.6

3.安裝docker-compose
sudo apt install docker-compose
查看docker-compose版本
sudo apt install docker-compose
這里版本為1.17.1

4.安裝golang
先打開瀏覽器去官網下載: https://golang.google.cn/dl/go1.15.2.linux-amd64.tar.gz.
下載完 Golang 壓縮包之后,進入壓縮包所在目錄,使用 tar 命令將壓縮包解壓到指定的 /usr/local/ 路徑下,命令如下
tar -xzvf go1.15.2.linux-amd64.tar.gz -C /usr/local/
下面我們開始配置環境變數
sudo vim /etc/profile
在檔案末尾加入如下代碼并保存退出
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
使用 source 命令,使剛剛添加的配置資訊生效
source /etc/profile
使用 go version 命令驗證是否安裝成功
go version
如下所示安裝成功

三、總結
現在我們fabric2.0的部署的基本環境就完成了 下一步我們開始部署fabric:
在Ubuntu18.04上部署搭建hyperledge fabric 2.0(二):鏡像部署網路
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/162256.html
標籤:其他
上一篇:下載Hyperdger Fabric 2.2.0的二進制檔案與docker鏡像指令
下一篇:小白基金購買指南
