1、参考地址:https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#install-curl

一、前置条件和系统配置

1、安装docker

http://www.cnblogs.com/bjlhx/p/7121875.html

2、系统配置

  Node.js-v2.1.8 及更高版本

  在Centos7 64位上安装node.js

yum install npm
查看npm版本:npm -v

3、安装curl  

yum install curl

4、安装golang

yum install golang

二、安装fabric

1、下载fabric

curl -sSL https://goo.gl/iX9dek | bash

可能会出现如下问题“Peer's Certificate has expired”

解决方案可能是本地时间问题

a>查看ssl更多信息  

curl https://www.baidu.com -v
* About to connect() to www.baidu.com port 443 (#0)
* Trying 180.97.33.107...
* Connected to www.baidu.com (180.97.33.107) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* Server certificate:
* subject: CN=baidu.com,OU=service operation department,O="Beijing Baidu Netcom Science Technology Co., Ltd.",L=Beijing,ST=Beijing,C=CN
* start date: Sep 17 00:00:00 2015 GMT
* expire date: Aug 31 23:59:59 2016 GMT
* common name: baidu.com
* issuer: CN=VeriSign Class 3 International Server CA - G3,OU=Terms of use at https://www.verisign.com/rpa (c)10,OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US
* NSS error -8181 (SEC_ERROR_EXPIRED_CERTIFICATE)
* Peer's Certificate has expired.
* Closing connection 0
curl: (60) Peer's Certificate has expired.
More details here: http://curl.haxx.se/docs/sslcerts.html

根据SEC_ERROR_EXPIRED_CERTIFICATE的错误说明,进行搜索,发现该命令是由于本地的时间不正确造成的。进行一次ntp时间同步

ntpdate pool.ntp.org

2、配置环境变量

执行上述命令时候回产生一个bin文件夹,配置这个环境变量

export PATH=<path to download location>/bin:$PATH

安装完毕

三、示例

1、安装git

yum install git

2、获取fabric-samples代码

git clone https://github.com/hyperledger/fabric-samples.git
cd fabric-samples

3、在目录fabric-samples中建立子目录 first-network

mkdir first-network
cd fabric-network

在first-network中增加byfn.sh文件

./byfn.sh -h
Usage:
byfn.sh -m up|down|restart|generate [-c <channel name>] [-t <timeout>]
byfn.sh -h|--help (print this message)
-m <mode> - one of 'up', 'down', 'restart' or 'generate'
- 'up' - bring up the network with docker-compose up
- 'down' - clear the network with docker-compose down
- 'restart' - restart the network
- 'generate' - generate required certificates and genesis block
-c <channel name> - config name to use (defaults to "mychannel")
-t <timeout> - CLI timeout duration in microseconds (defaults to 10000) Typically, one would first generate the required certificates and
genesis block, then bring up the network. e.g.: byfn.sh -m generate -c <channelname>
byfn.sh -m up -c <channelname>

这里直接使用first-samples自代示例直接运行

./byfn.sh -m generate

开启网络

./byfn.sh -m up

关闭

./byfn.sh -m down

执行相关命令

五、005-环境安装【docker、fabric】的更多相关文章

  1. linux环境安装docker,部署应用

    安装: 1.Docker要求CentOS系统的内核版本高于 3.10 ,通过 uname -r 命令查看你当前的内核版本是否支持安账docker 2.更新yum包:sudo yum update 3. ...

  2. 无网环境安装docker之--rpm

    总体思路:找一台可以联网的linux,下载docker的RPM依赖包而不进行安装(yum localinstall),将所有依赖的rpm环境打包好,再在无网环境中解压逐一安装(rpm:  --forc ...

  3. windows环境安装docker,并下载lamp镜像

    1.PC系统:windows10专业版 2.开启Hyper-V 此电脑->右击->属性->控制面板主页->(查看方式为小图标)程序和功能->右上方启动或关闭windows ...

  4. ubuntu环境安装docker

    查看已安装的docker apt list docker* 如果已安装,并且需要卸载,则执行以下命令: apt remove docker* 更新apt索引 apt update apt需要支持HTT ...

  5. Linux环境安装Docker

    1. 使用APT安装 # 更新数据源 apt-get update # 安装所需依赖 apt-get -y install apt-transport-https ca-certificates cu ...

  6. Linux环境安装Docker入门教程

    安装 下载 wget https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz 解压 tar -xvf ...

  7. ubuntu 12.04 安装Docker 实战

    2016-3-8 从网络服务商那里申请到一台Ubuntu测试服务器,用来测试安装Docker环境. 注:本人初学Docker,对Linux命令也仅是稍稍了解,如有错误,烦请告知. 查看系统相关信息 可 ...

  8. Ubuntu18.04上安装Docker CE

    建立 REPOSITORY 1.更新索引包 更新 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的地址,这样才能获取到最新的软件包 sudo ...

  9. Ubuntu 18.0.4安装docker

    第一步:如果之前安装过docker,执行下面命令删除 apt-get remove docker docker-engine docker.io 删除后执行sudo apt-get update更新软 ...

  10. Redhat 离线安装 Docker (Community from binaries)

    需求 在离线环境安装Docker (Community版),因为Enterprise版要花钱.当然资金充裕的客户可参考https://docs.docker.com/install/linux/doc ...

随机推荐

  1. vue动态切换视图

    big.vue <template> <div> big <p>{{view}}</p> <!--标准规范--> <component ...

  2. BZOJ4095 : [Usaco2013 Dec]The Bessie Shuffle

    首先将排列和整个序列以及询问都反过来,问题变成给定一个位置$x$,问它经过若干轮置换后会到达哪个位置. 每次置换之后窗口都会往右滑动一个,因此其实真实置换是$p[i]-1$. 对于每个询问,求出轮数, ...

  3. C#ConcurrentDictionary源代码

    using System; using System.Collections.Generic;using System.Text; using System.Threading; using Syst ...

  4. Centos 6 安装 Mysql 5.6

    参考:http://www.runoob.com/mysql/mysql-database-import.html 数据库 数据库(Database)是按照数据结构来组织.存储和管理数据的仓库, 每个 ...

  5. MySQL数据库引擎MyISAM和InnoDB的区别介绍

    MySQL数据库有多种存储引擎:比如:MyISAM.InnoDB.MERGE.MEMORY(HEAP).BDB(BerkeleyDB).EXAMPLE.FEDERATED.ARCHIVE.CSV.BL ...

  6. c语言单片机中断服务程序

    #include <reg52.h> #define uchar unsigned char #define uint unsigned int uint count; void dela ...

  7. 20、MySQLdb

    MySQLdb win64位安装python-mysqldb1.2.5 ubuntu下安装MySQLdb sudo apt-get install python-MySQLdb 导入MySQLdb库 ...

  8. 找回停掉docker的文件

    如果容器还能重启,就restart, 如果状态是DEAD的话, Error response from daemon: Container is marked for removal and cann ...

  9. 【Storm】Storm实战之频繁二项集挖掘(附源码)

    一.前言 针对大叔据实时处理的入门,除了使用WordCount示例之外,还需要相对更深入点的示例来理解Storm,因此,本篇博文利用Storm实现了频繁项集挖掘的案例,以方便更好的入门Storm. 二 ...

  10. Java远程调用原理DEMO

    1. POJO public class DemoInfo implements Serializable{ private String name; private int age; public ...