首先这篇文章的目的是教会大家如何在ubuntu系统上安装hyperledger fabric并运行起来,因为目前网络上所有的教程都是之前的fabric版本,然而现在的fabric版本相较于之前版本已经改变了很多,如果使用之前的方法来安装fabric是不能成功运行的。
1.首先得有一台系统为ubuntu的服务器(centos其实操作原理差不多),推荐使用虚拟机安装ubuntu系统。
2.更换apt的下载源,官方下载源很慢,我们需要更换到国内的镜像站
2.1 进入 /etc/apt 目录
cd /etc/apt
2.2 备份 sources.list 文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
2.3 打开 sources.list 文件进行修改并添加阿里云镜像
#在文件最前面添加即可
sudo vi /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
2.4 对 apt-get 进行更新
sudo apt-get update sudo apt-get upgrade
3. 环境安装
我们需要安装的软件有 go docker docker-compose nodejs
3.1 安装 go
#进入根目录
cd ~
#下载压缩包
wget https://studygol