文檔
http://hyperledger-fabric.readthedocs.io/en/release/prereqs.html
安裝 cURL
mac 環(huán)境中已經(jīng)安裝了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
安裝 Docker and Docker Compose
下載docker
https://store.docker.com/editions/community/docker-ce-desktop-mac
測試docker
$ docker --version
$ docker-compose --version
安裝 Homebrew
官網(wǎng)
https://brew.sh/index_zh-cn.html
安裝命令
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Go Programming Language
$ brew install go
Node.js Runtime and NPM
Node.js version 9.x is not supported at this time.
Node.js - version 8.9.x or greater
安裝Node.js也將安裝NPM,但建議您確認(rèn)安裝的NPM的版本。您可以npm使用以下命令升級該工具:
npm install npm@5.6.0 -g
安裝nvm
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.7/install.sh | bash
安裝過程
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.
編輯 .bash_profile ,可以在終端使用 nvm 命令
$ cd ~
$ vi .bash_profile
.bash_profile 添加如下代碼
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"
然后重新source
$ source .bash_profile
安裝 node 的指定版本
nvm install 6.9.5