如果你已经安装好go等工具、git及checkout相关代及下载相关镜像,您只需下面5步就能up e2e_cli
~/go/src/github.com/hyperledger/fabric$ sudo chmod 777 release
~/go/src/github.com/hyperledger/fabric$ sudo chmod 777 examples/e2e_cli
~/go/src/github.com/hyperledger/fabric$ sudo chmod 777 examples/e2e_cli/docker-compose-e2e.yaml
~/go/src/github.com/hyperledger/fabric$ sudo chmod -R 777 examples/e2e_cli/channel-artifacts
~/go/src/github.com/hyperledger/fabric$ sudo vi examples/e2e_cli/base/peer-base.yaml
改成 - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_cli_default,wq存盘退出

ubuntu16.04下Hyperledger之搭建Fabric环境简单操作(五步启动e2e_cli)
http://402133619a.hk35.lfw.cn.com/forum.php?mod=viewthread&tid=3
(出处: 区块云)

~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ ./network_setup.sh down

~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ ./network_setup.sh up

如果您是从新的开始,请照着下面步骤来

下载ubuntu16.04(必须是该版本,不要下载最新版本)ISO文件,如果在windows下用虚拟机运行ubunto16.04,还需要下载VMware或Virtualbox,这里安装比较简单,如需帮助另找资料。
以下都可以用户登录后默认目录进行
ubuntu上更改国内资源地址及更新安装源
如果是虚拟机上操作,点击linux界面,按shift+t打开终端,在终端输入,复制时不要复制前面linux的光标提示符:$
$ sudo vi /etc/apt/sources.list
在vi界面上替换成cn
:%s/us./cn./g
更新源
$ sudo apt-get update
然后安装ssh,这样就可以用putty或者SecureCRT之类的客户端远程连接linuxUbuntu了
$ sudo apt-get install ssh
打开ssh远程访问配置
$ sudo vi /etc/ssh/sshd_config,进入vi编辑界面后按/PermitRootLogin 
找到PermitRootLogin,按esc键,有方向键把光标移到PermitRootLogin 后按一下a,输入yes #
如下:
PermitRootLogin yes #PermitRootLogin
保存退出后

再ifconfig,记下linux网卡IP,在putty等上输入连接主机时,录入这个IP与用户名密码,就可以远程登录linux了,如果登录不上,重启一下ssh

安装go环境,下载安装压缩包

$ wget https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz
解压缩
$ sudo tar -C /usr/local -xzf go1.9.linux-amd64.tar.gz
配置系统变量以及属性
$ vi ~/.profile
添加变量,直接用我的就可以
export PATH=$PATH:/usr/local/go/bin 
export GOROOT=/usr/local/go 
export GOPATH=$HOME/go

保存配置文件
$ source ~/.profile

创建go文件夹
$ cd ~
$ mkdir go

安装Docker
如果OS是第一次安装Docker,可先卸载可能存在的旧版本$ sudo apt-get remove docker docker-engine docker-ce docker.io

安装curl
$ sudo apt install curl
安装CA证书,才可以通过HTTPS使用存储库(repository)
$ sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
添加Docker官方的GPG密钥
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
使用下面的命令来设置stable存储库
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
再更新一下apt包索引
$ sudo apt-get update
安装最新版本的Docker CE
$ sudo apt-get install -y docker-ce

检查docker版本
$ docker --version

Docker version 18.03.1-ce, build 9ee9f40
有以上输出则证明docker已安装成功!

安装docker-composeapt-get update,如果有老版的,先删除掉$ sudo pip uninstall docker-compose
$ sudo apt-get install python-pip
$ sudo pip install docker-compose
$ docker-compose --version
docker-compose version 1.21.2, build a133471
docker-py version: 3.3.0
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
安装GIT
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git

建立go工程的目录
$ sudo mkdir -p ~/go/src/github.com/hyperledger
这里开始改变目录,进入工程目录
$ cd ~/go/src/github.com/hyperledger

如查之前下载过fabric,则删除
~/go/src/github.com/hyperledger$ rm -rf fabric
重新下载cheout
~/go/src/github.com/hyperledger$ sudo git clone https://github.com/hyperledger/fabric.git
~/go/src/github.com/hyperledger$ cd ~/go/src/github.com/hyperledger/fabric
~/go/src/github.com/hyperledger/fabric$ sudo git checkout v1.0.0
~/go/src/github.com/hyperledger/fabric$ sudo chmod 777 release
~/go/src/github.com/hyperledger/fabric$ sudo chmod 777 examples/e2e_cli
~/go/src/github.com/hyperledger/fabric$ sudo chmod 777 examples/e2e_cli/docker-compose-e2e.yaml
~/go/src/github.com/hyperledger/fabric$ sudo chmod -R 777 examples/e2e_cli/channel-artifacts
~/go/src/github.com/hyperledger/fabric$ sudo vi examples/e2e_cli/base/peer-base.yaml
改成 - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_cli_default,wq存盘退出

Fabric Docker镜像的下载
进入fabric文件夹下的examples/e2e_cli, 下面我们要测试e2e_cli这个demo
~/go/src/github.com/hyperledger/fabric$ cd ~/go/src/github.com/hyperledger/fabric/examples/e2e_cli/
程序将会通过docker拉取项目所需镜像, 为了统一版本,请指定拉取镜像的版本号
~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ source download-dockerimages.sh -c x86_64-1.0.0 -f x86_64-1.0.0
或者,两个命令有一个对就行了
~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ ./download-dockerimages.sh -c x86_64-1.0.0 -f x86_64-1.0.0

下拉时间有点长,等下完再执行启动,如果之前做类似启动,先./network_setup.sh down
~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ ./network_setup.sh up

第一次运行比较久,耐心等等出错
运气好,等了好久出现

===================== All GOOD, End-2-End execution completed =====================

_____   _   _   ____            _____   ____    _____
| ____| | \ | | |  _ \          | ____| |___ \  | ____|
|  _|   |  \| | | | | |  _____  |  _|     __) | |  _|
| |___  | |\  | | |_| | |_____| | |___   / __/  | |___
|_____| |_| \_| |____/          |_____| |_____| |_____|

ubuntu16.04下Hyperledger之搭建Fabric环境简单操作(五步启动e2e_cli)的更多相关文章

  1. ubuntu16.04下安装配置深度学习环境(Ubuntu 16.04/16.10+ cuda7.5/8+cudnn4/5+caffe)

    主要参照以下两篇博文:http://blog.csdn.net/g0m3e/article/details/51420565   http://blog.csdn.net/xuzhongxiong/a ...

  2. ubuntu16.04下安装配置深度学习环境(一、cuda7.5的安装)

    1.下载所需要的软件 cuda7.5下载(点击下载链接),cudnn4.0下载 2.安装NVIDIA驱动. 一般有两种方法:1)一种方法是利用"软件和更新"来安装,依次选择 系统设 ...

  3. ubuntu16.04 下Mongo数据库搭建

    一 数据库安装 1.下载自己需要的数据库版本和系统,下载地址:https://www.mongodb.com/download-center/community . 本文下载的为ubuntu 16.0 ...

  4. Ubuntu16.04下安装破解secureCRT和secureFX的操作记录

    本地电脑之前安装的是win10,疲于win10频繁的更新和各种兼容问题,果断放弃win10系统,安装了Ubuntu 16.04系统,现在微信.QQ.钉钉.WPS等都已支持linux版本,所以在Ubun ...

  5. Ubuntu16.04下LAMP环境的安装与配置

    Ubuntu16.04下LAMP环境的安装与配置 最近做个实验需要用到Ubuntu环境的靶场,所以这里介绍下Ubuntu环境下LAMP的安装与配置,话不多说,我们gkd! 1.Apache2的安装 首 ...

  6. Ubuntu16.04下,rabbimq集群搭建

    rabbitmq作为企业级的消息队列,功能很齐全,既可以作为单一的部署模式,又可以做集群的部署模式 单一部署就不说了,就是在一台服务器上部署rabbitmq消息队列,可以参考我的博客:Ubuntu16 ...

  7. ubuntu16.04下安装opencv3.4.1及其扩展模块

    1.源文件下载 opencv-3.4.1.tar.gz(https://github.com/opencv/opencv/releases) opencv_contrib-3.4.1.tar.gz(h ...

  8. Ubuntu16.04下Neo4j图数据库官网安装部署步骤(图文详解)(博主推荐)

    不多说,直接上干货! 说在前面的话  首先,查看下你的操作系统的版本. root@zhouls-virtual-machine:~# cat /etc/issue Ubuntu LTS \n \l r ...

  9. Ubuntu16.04下Mongodb(离线安装方式|非apt-get)安装部署步骤(图文详解)(博主推荐)

    不多说,直接上干货! 说在前面的话  首先,查看下你的操作系统的版本. root@zhouls-virtual-machine:~# cat /etc/issue Ubuntu LTS \n \l r ...

随机推荐

  1. 乘风破浪:LeetCode真题_036_Valid Sudoku

    乘风破浪:LeetCode真题_036_Valid Sudoku 一.前言 有的时候对于一些基础知识的掌握,对我们是至关重要的,比如ASCII重要字符的表示,比如一些基本类型的长度. 二.Valid ...

  2. November 03rd, 2017 Week 44th Friday

    The secret of success is to do the common things uncommonly well. 成功的秘诀就是把平凡的事情做得异常的好. Sometimes you ...

  3. c++ 远程连接局域网内 数据库,并进行操作

    首先尝试利用Windows自带的dos命令窗口操作数据库:参考见https://jingyan.baidu.com/article/3aed632e19b5e8701080918f.html 1.搜索 ...

  4. Spring IOC容器创建bean过程浅析

    1. 背景 Spring框架本身非常庞大,源码阅读可以从Spring IOC容器的实现开始一点点了解.然而即便是IOC容器,代码仍然是非常多,短时间内全部精读完并不现实 本文分析比较浅,而完整的IOC ...

  5. XSS详解

    什么是XSS(跨站脚本攻击) XSS又叫CSS (Cross Site Script) ,跨站脚本攻击.它指的是恶意攻击者往Web页面里插入恶意html代码或者javascript代码,当用户浏览该页 ...

  6. 用python实现MRO算法

    引子: 如图反映了python3中,几个类的继承关系和查找顺序.对于类A,其查找顺序为:A,B,E,C,F,D,G,(Object),这并不是一个简单的深度优先或广度优先的规律.那么这个顺序到底是如何 ...

  7. Android SDK4/5/6/7,相册、拍照及裁剪功能及遇见的坑

    保存照片和视频到系统相册显示- http://blog.csdn.net/chendong_/article/details/52290329 Android 7.0 之拍照与图片裁剪适配-http: ...

  8. docker pull下载镜像时的报错及其解决方法

    使用docker pull从镜像仓库拉取镜像时报错如下: [root@docker-registry ~]# docker pull centos Using default tag: latest ...

  9. python:'ascii' codec can't encode character

    python默认的编码是ascii,当程序中出现非ascii编码时,python的处理常常会报这样的错,python没办法处理非ascii编码的, 此时需要自己设置python的默认编码,一般设置为u ...

  10. python_基础语法

    开始正式接触python的语法: 1. 2.