Compile the source code

Step 1. 安装git

sudo apt-get install git

Step 2. 安装vagrant(ubuntu系统)

下载地址https://releases.hashicorp.com/vagrant/1.8.6/vagrant_1.8.6_x86_64.deb,然后双击,install即可。

在命令行中执行which vagrant,结果为/usr/bin/vagrant,说明安装成功

Step 3.安装VirtualBox

https://www.virtualbox.org/wiki/Linux_Downloads

Step 4.安装go

下载Go语言安装包https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz

在命令行执行如下命令: sudo tar -C /usr/local -xzf go1.7.1.linux-amd64.tar.gz

Step 5.下载ubuntu镜像

p { margin-bottom: 0.1in; line-height: 120% }

https://atlas.hashicorp.com/hyperledger/boxes/fabric-baseimage/versions/0.1.0/providers/virtualbox.box

Rename the filename to blockchain.iso(whatever you what to call,It doesn't matter)

Step 6.vim ~/.profile配置如下参数

p { margin-bottom: 0.1in; line-height: 120% }
a:link { }
vim ~/.profile配置如下参数
--> { }
p { margin-bottom: 0.1in; line-height: 120% }
a:link { }
vim ~/.profile配置如下参数
--> { }

export GOROOT=/usr/local/go

export GOPATH=/opt/gopath

export GOBIN=/usr/local/go/bin

export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

save and then run  source ~/.profile

Step 7.创建GOPATH路径

cd /opt
sudo mkdir gopath
sudo chown -R gupp:gupp gopath //change the owner and group to your computer

Step 8.创建farbic相关目录

cd $GOPATH
mkdir -p src/github.com/hyperledger
cd github.com/hyperledger

Step 9:下载代码

fork the source code to your own git repositories

git clone https://github.com/minxinfeng/fabric.git //the fabric must be in the folder $GOPATH/src/github.com/hyperledger

pre.cjk { font-family: "Nimbus Mono L", monospace }
p { margin-bottom: 0.1in; line-height: 120% }
a:link { }

10.Attach the box we downloaded into vagrant:

cd $GOPATH/src/github.com/hyperledger/fabric/devenv
vagrant box add --name hyperledger/fabric-baseimage  /home/gupp/blockchain.iso

11.Modify the file Vagrantfile

comment these commands:

#./setup #that means it will run setup file to do somethings

#config.vm.box_version = ENV[

12.Start virtualbox using command   vagrant up  ,can refer this document:fabric devenv Vagrantfile配置

13.SSH to virtualbox and do something using command  vagrant ssh

14.The
following steps we will do in the VM
, and in folder
$GOPATH/src/github.com/hyperledger/fabric/devenv

setup.sh
do the following things, so we split it into seveal parts to run

1)Install docker and
start the docker service

2)Install some
useful commands by  /hyperledger/scripts/provision/host.sh, such
as docker-compose/python-dev/libyaml-dev/Python
grpc/Tcl/NPM/Jdk/Gradle.

Note:The
docker-compose and gradle are downloaded from network. I changed to
download it first and then using local file to install

3)compile the
commads by    make clean peer

4) set the
environment

Then, we can in
folder fabric to make images and memberserv

make images  //Then
using command docker images can find the images we just made

make memberserv

Note:DO
NOT USE SUDO

15. Package
our box

cd $GOPATH/src/github.com/hyperledger/fabric/devenv
vagrant package

now we get the package.box that can be used in other Ubuntu System following the next steps.

Install on other Ubuntu System with the package.box generated

1.Do the same thing following the above steps: step2,3,4,6,7,8

2.Copy the fabric folder(with the compiled files) into folder $GOPATH/src/github.com/hyperledger

3.Attach the box we packaged into vagrant:

cd $GOPATH/src/github.com/hyperledger/fabric/devenv
vagrant box add --name hyperledger/fabric-baseimage  /home/gupp/package.box

4.Modify the file Vagrantfile

comment these commands:

#./setup #that means it will run setup file to do somethings

#config.vm.box_version = ENV[

5.Start virtualbox using command  vagrant up ,can refer this document:fabric devenv Vagrantfile配置

6.SSH to virtualbox and do something using command  vagrant ssh

And now we install it, enjoy your blockchain

Problems

Run commands 1-8 in a virtualbox running on Windows:

//进入devenv所在文件夹
cd $GOPATH/src/github.com/hyperledger/fabric/devenv
//执行如下命令
vagrant up
//该命令行直接下载ubuntu镜像,下载地址https://atlas.hashicorp.com/hyperledger/boxes/fabric-baseimage/versions/0.0.11/providers/virtualbox.box
vagrant ssh

vagrant执行完成之后,报错,因为在虚拟机中无法再次开启虚拟机,因此只能在真机上进行环境部署。错误信息如下:

TBD

1. core/chaincode/shim/java/javabuild.sh How to configure the jar by using local jar

2. make gotools :There have some questions

数据库位置/var/hyperledger/production

linux安装open block chain的更多相关文章

  1. Linux 安装及配置 Nginx + ftp 服务器

    Nginx 安装及配置 一.Nginx 简介: Nginx("engine x") 是一款是由俄罗斯的程序设计师 Igor Sysoev 所开发高性能的 Web和 反向代理服务器, ...

  2. Linux安装-kickstart无人值守安装

    Linux安装-kickstart无人值守安装 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 大家做运维估计都避免不了时不时会去机房安装一台linux服务器,但是服务器启动的特别慢 ...

  3. Linux 安装 Oracle 11g R2

    一.安装环境 Linux服务器:Centos 6.4 64位 Oracle服务器:Oracle11gR2 64位 二.系统要求 Linux安装Oracle系统要求 系统要求 说明 内存 必须高于1G的 ...

  4. Block Chain Learning Notes

    区块链是什么 区块链技术是由比特币创造的,本文也将从比特币开始进行引导,一步一步告诉大家什么是区块链.如果你想立马知道区块链是什么,也可以直接转到文章末尾的区块链定义. 区块链,可能是当下最有前景又充 ...

  5. Arch Linux 安装简明流程

    Arch Linux 安装简明流程 这是一篇为 GPT/EFI 引导 的电脑安装 Arch Linux(双系统)的中文简明流程,尽可能省略了可以省略的流程与文字以使得篇幅尽量短小,基本上基于 Arch ...

  6. 搜狗输入法linux安装 以及 12个依赖包下载链接分享

    搜狗输入法linux安装版,先安装各种依赖包,大概12个依赖,可能中途还需要其他依赖,可以效仿解决依赖问题.如图这12个文件要是手动点击下载,那也太笨点了,我们要用shell命令批量下载.命令如下:w ...

  7. linux安装php

    接上篇:linux安装apache 一.安装php 先安装libxml2库 [root@ctxsdhy package]# yum -y install libxml2-devel 最新地址在:htt ...

  8. linux安装oracle11g

    准备oracle安装文件 Oracle11gR2包含两个文件linux_11gR2_database_1of2.zip和linux_11gR2_database_2of2.zip,将这两个文件通过SS ...

  9. TODO:Linux安装PHP MongoDB驱动

    TODO:Linux安装PHP MongoDB驱动 PHP利于学习,使用广泛,主要适用于Web开发领域. MongoDB的主要目标是在键/值存储方式(提供了高性能和高度伸缩性)以及传统的RDBMS系统 ...

随机推荐

  1. IIS如何配置可以下载APK、IPA文件

    解决步骤: 1).打开IIS服务管理器,找到服务器,右键-属性,打开IIS服务属性: 2.单击MIME类型下的“MIME类型”按钮,打开MIME类型设置窗口: 3).单击“新建”,建立新的MIME类型 ...

  2. EL表达式不解析

    使用EL表达式时,遇到了页面直接显示"time: ${requestScope.time}",不解析的情况.查找资料原因是:在默认情况下,Servlet 2.3 / JSP 1.2 ...

  3. sphinx 配置文件全解析

    sphinx的配置文件是在配置的时候最容易出错的了: 我们先要明白几个概念: source:数据源,数据是从什么地方来的. index:索引,当有数据源之后,从数据源处构建索引.索引实际上就是相当于一 ...

  4. entity-model-first

  5. Gravatar注册

    今天在学习falsk时需要用到头像扩展,需要使用gravatar到网上查了查好像没有被墙,就试着用qq邮箱注册了一个账号,结果等了好长时间也没有等到激活邮箱,就百度了一下发现了一个技巧,原来这封邮件被 ...

  6. CLion 2016.1.1 下载 附注册激活码 破解版方法

    http://www.520xiazai.com/soft/CLion-2016.1.1.html CLion 2016.1.1 下载 附注册激活码 破解版方法 注册破解方法:在要求输入注册的界面选择 ...

  7. 【转】Java enum的用法详解

    用法一:常量 在JDK1.5 之前,我们定义常量都是: public static fianl.... .现在好了,有了枚举,可以把相关的常量分组到一个枚举类型里,而且枚举提供了比常量更多的方法. p ...

  8. [NHibernate]缓存(NHibernate.Caches)

    系列文章 [Nhibernate]体系结构 [NHibernate]ISessionFactory配置 [NHibernate]持久化类(Persistent Classes) [NHibernate ...

  9. 关于学习JavaScript 的 高三编程 一些心得(三)

    最近在学习高三的 过程中,遇到的了一些 难以理解的问题, 在看到第五章之前都是 OK 的.但是到了 引用类型的时候就有点蒙了. 首先我们看下,引用类型的  解释:[引用类型的值(对象)是引用类型的一个 ...

  10. Pandas-数据聚合与分组运算

    目录 图解"split-apply-combine" 数据的分类split: groupby() 以column进行分组 以index进行分组 分组遍历 数据的应用apply: a ...