参考文档:https://hyperledger-fabric.readthedocs.io/en/release-1.1/index.html
- 前言:此文章主要由三部分组成:第一部分是整个完整的部署过程,第二部分是整个过程中的问题的汇总,最后是整个过程的个人小结部分
- 用的机子最好内存不低于4g
一、部署过程
(一)更改aptget源
(本机是Ubuntu16.04,下载软件默认是从国外下载的,速度较慢,也容易出现问题,所以在进行环境的部署之前,最好先更新)
- 复制原文件备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
- 编辑源列表文件(这里稍微讲一下vim的简单操作)
sudo vim /etc/apt/sources.list
a.进入vim的命令模式,输入i/a进行编辑
b.输入G,将光标移到最后一行,输入1,.d
将文件内容全部删除,将下面的内容复制粘贴进去
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
c.输入Esc退出输入模式,输入:w
保存内容,输入:q
退出vim
(二)基本环境部署(Docker,Docker-compose,Go,Git)
1、Docker安装
- 安装需要的工具
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates