Hyperledger Caliper安裝(最新19-12-23)

Hyperledger Caliper
官網:https://github.com/hyperledger/caliper

一、確定有沒有安裝這些工具

The following tools are required to install the CLI from NPM:
	1. node-gyp, python2, make, g++ and git (for fetching and compiling some packages during install)
	2. Node.js v8.X LTS or v10.X LTS (for running Caliper)
	3. Docker and Docker Compose (only needed when running local examples, or using Caliper through its Docker image)
	#建議將老版本卸載了重裝node

node安裝

	https://nodejs.org/dist/latest-v10.x/     #官網下載源碼
	tar -xvf  node-v10.18.0-linux-x64.tar.gz
	sudo mv  node-v10.18.0-linux-x64 /usr/local/
	sudo gedit /etc/profile  (將下面環境加到末尾)
	export PATH=$PATH:/usr/local/node-v10.18.0-linux-x64/bin

二、安裝caliper

1. npm init -y
2. npm install --only=prod @hyperledger/caliper-cli
3. npx caliper bind --caliper-bind-sut fabric --caliper-bind-sdk 1.4.0
4. npx caliper benchmark run --caliper-workspace . --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/fabric/fabric-v1.4.1/2org1peergoleveldb/fabric-go.yaml

(新建一個文件夾,執行1,執行2可能會很慢,建議先換成npm淘寶源。執行完3,第4步需要樣例文件,github上去下載,把他們放在一起)
淘寶源:npm config set registry http://registry.npm.taobao.org/
樣例文件:https://github.com/hyperledger/caliper-benchmarks

一定把下載的樣例文件和安裝文件放一起,第四步會根據路徑尋找配置文件

Bingo

在這裏插入圖片描述
有問題,DD我。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章