分享

Hyperledger fabric mac 环境搭建 001

 quasiceo 2018-03-28


原创 2017年12月20日 10:28:31

安装 cURL

mac 环境中已经安装了curl

$ curl --version
curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
  • 1
  • 2

安装 Docker and Docker Compose

下载docker

https://store./editions/community/docker-ce-desktop-mac

安装docker

安装docker

测试docker

$ docker --version

$ docker-compose --version
  • 1
  • 2
  • 3

安装 Homebrew

官网

https:///index_zh-cn.html

安装命令

/usr/bin/ruby -e "$(curl -fsSL https://raw./Homebrew/install/master/install)"
  • 1

Go Programming Language

$ brew install go
  • 1

Node.js Runtime and NPM

Node.js version 7.x is not supported at this time.

Node.js - version 6.9.x or greater
  • 1
  • 2
  • 3

fabric 暂时不支持7.x,需要安装6.9.x 或 6.x高的版本,通过 nvm 安装指定版本的node

安装nvm

$ curl -o- https://raw./creationix/nvm/v0.33.7/install.sh | bash
  • 1

安装过程

You should create NVM's working directory if it doesn't exist:

  mkdir ~/.nvm

Add the following to ~/.bash_profile or your desired shell
configuration file:

  export NVM_DIR="$HOME/.nvm"
  . "/usr/local/opt/nvm/nvm.sh"

You can set $NVM_DIR to any location, but leaving it unchanged from
/usr/local/opt/nvm will destroy any nvm-installed Node installations
upon upgrade/reinstall.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

编辑 .bash_profile ,可以在终端使用 nvm 命令

$ cd ~ 
$ vi .bash_profile 
  • 1
  • 2

.bash_profile 添加如下代码

export NVM_DIR="$HOME/.nvm"
  . "/usr/local/opt/nvm/nvm.sh"
  • 1
  • 2

然后重新source

$ source .bash_profile
  • 1

安装 node 的指定版本

nvm install 6.9.5

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多