005-环境安装【docker、fabric】
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 (#)
* Trying 180.97.33.107...
* Connected to www.baidu.com (180.97.33.107) port (#)
* 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 :: GMT
* expire date: Aug :: GMT
* common name: baidu.com
* issuer: CN=VeriSign Class 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 - (SEC_ERROR_EXPIRED_CERTIFICATE)
* Peer's Certificate has expired.
* Closing connection
curl: () 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 ) 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】的更多相关文章
- linux环境安装docker,部署应用
安装: 1.Docker要求CentOS系统的内核版本高于 3.10 ,通过 uname -r 命令查看你当前的内核版本是否支持安账docker 2.更新yum包:sudo yum update 3. ...
- 无网环境安装docker之--rpm
总体思路:找一台可以联网的linux,下载docker的RPM依赖包而不进行安装(yum localinstall),将所有依赖的rpm环境打包好,再在无网环境中解压逐一安装(rpm: --forc ...
- windows环境安装docker,并下载lamp镜像
1.PC系统:windows10专业版 2.开启Hyper-V 此电脑->右击->属性->控制面板主页->(查看方式为小图标)程序和功能->右上方启动或关闭windows ...
- ubuntu环境安装docker
查看已安装的docker apt list docker* 如果已安装,并且需要卸载,则执行以下命令: apt remove docker* 更新apt索引 apt update apt需要支持HTT ...
- Linux环境安装Docker
1. 使用APT安装 # 更新数据源 apt-get update # 安装所需依赖 apt-get -y install apt-transport-https ca-certificates cu ...
- Linux环境安装Docker入门教程
安装 下载 wget https://download.docker.com/linux/static/stable/x86_64/docker-18.06.1-ce.tgz 解压 tar -xvf ...
- ubuntu 12.04 安装Docker 实战
2016-3-8 从网络服务商那里申请到一台Ubuntu测试服务器,用来测试安装Docker环境. 注:本人初学Docker,对Linux命令也仅是稍稍了解,如有错误,烦请告知. 查看系统相关信息 可 ...
- Ubuntu18.04上安装Docker CE
建立 REPOSITORY 1.更新索引包 更新 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的地址,这样才能获取到最新的软件包 sudo ...
- Redhat 离线安装 Docker (Community from binaries)
需求 在离线环境安装Docker (Community版),因为Enterprise版要花钱.当然资金充裕的客户可参考https://docs.docker.com/install/linux/doc ...
- 【docker部署】基于linux的centos操作系统部署安装docker容器
一.docker介绍 容器是轻量级的,包含应用运行所需所有东西(代码.库.运行时环境.系统设置,以及依赖关系)的独立的包.每个容器都部署于它自己的 CPU.内存.块 I/O,以及网络资源上,所有这些都 ...
随机推荐
- [JNA系列]Java调用Delphi编写的Dll之实例Delphi使用PWideChar
Delphi代码 unit UnitDll; interface uses StrUtils, SysUtils, Dialogs; function DoBusinessWide(pvData: P ...
- HBase之HFile解析
Sumary: Protobuf BinarySearch 本篇主要讲HFileV2的相关内容,包括HFile的构成.解析及怎么样从HFile中快速找到相关的KeyValue.基于Hbase 0.98 ...
- 使用AngularJS创建应用的5个框架
[导读] 如果你计划使用AngularJS创建你的Web应用,那现在就开始吧.你不需要有任何的恐惧和担心,因为现在有很多的框架都可以很好地支持AngularJS.这些框架都有事先安装的Web组件,使用 ...
- ubuntu1204-gedit中文乱码
1 在界面上使用ALT-F2打开"执行应用程序"界面. 2 输入dconf-editor.然后点击"执行"打开"Configuration Edito ...
- XmLHttpRequst下载Excel
//得到浏览器版本 myJqHelp.getBrowser = function () { var ua = window.navigator.userAgent; var isIE = !!wind ...
- RegDBGetKeyValueEx函数使用报错error 1 numeric value required
参考:http://evely.blog.51cto.com/1089422/1400965 RegDBGetKeyValueEx函数: InstallSheild Script Code 123 ...
- boost容器bimap简单使用
C++标准提供了map和multi_map,把key映射到value; 但是这种映射是单向的,只能是key到value,不能反过来; boost.bimap扩展了标准库映射型容器,提供双向 ...
- poj 1659(havel算法)
题目链接:http://poj.org/problem?id=1659 思路: havel算法的应用: (1)对序列从大到小进行排序. (2)设最大的度数为 t ,把最大的度数置0,然后把最大度数后 ...
- 高质量JavaScript代码
才华横溢的Stoyan Stefanov,在他写的由O’Reilly初版的新书<JavaScript Patterns>(JavaScript模式)中,我想要是为我们的读者贡献其摘要,那会 ...
- 桥梁模式(Bridge)
桥梁模式属于结构类的设计模式,示意结构图如下: