如果你已经安装好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. October 15th 2017 Week 42nd Sunday

    Excellence is a continuous process and not an accident. 卓越是一个持续的过程而不是一个偶然事件. It is said that ten tho ...

  2. Eclipse Mars 2安装Drools6.4插件(Drools and jBPM tools)时无法安装JBoss Runtime Drools Detector

    在eclipse上本地安装Drools6.4Final的时候出现两个组件无法正常安装的情况,具体组件如下: 具体的提示信息为: Cannot complete the install because ...

  3. 【Odoo 8开发教程】第一章:Odoo 8.0安装

    转载请注明原文地址:https://www.cnblogs.com/cnodoo/p/10779733.html odoo有三种常见的安装方式:打包程序安装.源码安装以及Docker镜像安装. 一:打 ...

  4. linux 的常用命令---------第六阶段

    磁盘管理 IDE 硬盘 (了解)硬盘接口 :   SATA 硬盘 SCSI 硬盘 SAS 硬盘 分区付的认识:(笔试题) MBR :硬盘主引导记录,共512字节,由三部分组成 主引导程序 :占446个 ...

  5. leetcode 460. LFU Cache

    hash:存储的key.value.freq freq:存储的freq.key,也就是说出现1次的所有key在一起,用list连接 class LFUCache { public: LFUCache( ...

  6. 使用iozone进行磁盘读写性能测试

    对于很多GIS工程师,经常需要对系统的磁盘性能进行测试,为了排查问题或者帮助用户进行系统设计. IOZone这个磁盘性能测试工具就是一个很方便的辅助工具. 下面就以个测试共享目录的读写性能为例,说明其 ...

  7. OpenCV——ORB特征检测与匹配

    原文链接:https://mp.weixin.qq.com/s/S4b1OGjRWX1kktefyHAo8A #include <opencv2/opencv.hpp> #include ...

  8. Python2.7-stat

    stat模块,用于解释 os.stat(),os.lstat(),os.fstat() 返回的结果,定义了许多表示文件或路径的各个状态的常数和测试各个状态的函数具体参考 官方文档 和 http://w ...

  9. python3——print使用

        print的初步认识:对于科班出身的或有相关经验的人来说,学习python是相当有趣的事,因为可以做日常任务, 比如自动备份你的MP3:可以做网站,如YouTube就是Python写的:可以做 ...

  10. Apple Watch应用开发之PM2.5查询

    最近脚伤,停止了跑步,看来又要胖了,不过最近倒是对Swift语言很感兴趣,然后就开始了Apple Watch应用的开发,今天是6月8日,苹果的发布会就会在今天过后的凌晨一点开始,今天还是有点小激动的, ...