fabric二進(jìn)制工具tips

fabric二進(jìn)制工具

我們?cè)谂躣emo的時(shí)候,會(huì)用到fabric的二進(jìn)制工具,比如:

  • configtxgen
  • configtxlator
  • cryptogen
    ... 等等

這些二進(jìn)制工具在官方教程或者網(wǎng)上一些前輩留下的資料存在被強(qiáng)的可能

如:

  • 官方描述:
curl -sSL http://bit.ly/2ysbOFE | bash -s 1.2.0
  • 百度出來的前輩資料:
curl -sSL https://goo.gl/eYdRbX | bash

后來有前輩修傳到了公有云上:

curl -sSL http://oui195df4.bkt.clouddn.com/download-bin.sh | bash

其實(shí),我們大可不必這么麻煩,在官方源碼中已經(jīng)告訴我們?nèi)绾紊蛇@些文件

首先從github上面獲取fabric源碼

git clone https://github.com/hyperledger/fabric.git

然后直接在該目錄下執(zhí)行:

make release

等運(yùn)行完就可以在release目錄下就直接生成出來了,是不是異常簡單,比墻外或者云上下載要簡單得多。
編譯完成之后,記得將該目錄加入到系統(tǒng)環(huán)境變量PATH中去,避免在腳本運(yùn)行的時(shí)候找不到這些二進(jìn)制工具。

那為什么我們執(zhí)行make release就可以生成了呢,那是因?yàn)樵贛akefile文件中,已經(jīng)給我們標(biāo)注出來了,當(dāng)參數(shù)是release時(shí)候,會(huì)生成自身平臺(tái)對(duì)應(yīng)的二進(jìn)制工具。

release - builds release packages for the host platform

這里除了release還有很多參數(shù)可以傳入,如:

#- all (default) - builds all targets and runs all non-integration tests/checks
#- checks - runs all non-integration tests/checks
#- desk-check - runs linters and verify to test changed packages
#- configtxgen - builds a native configtxgen binary
#- configtxlator - builds a native configtxlator binary
#- cryptogen  -  builds a native cryptogen binary
#- idemixgen  -  builds a native idemixgen binary
#- peer - builds a native fabric peer binary
#- orderer - builds a native fabric orderer binary
#- release - builds release packages for the host platform
#- release-all - builds release packages for all target platforms
#- unit-test - runs the go-test based unit tests
#- verify - runs unit tests for only the changed package tree
#- profile - runs unit tests for all packages in coverprofile mode (slow)
#- test-cmd - generates a "go test" string suitable for manual customization
#- gotools - installs go tools like golint
#- linter - runs all code checks
#- check-deps - check for vendored dependencies that are no longer used
#- license - checks go source files for Apache license header
#- native - ensures all native binaries are available
#- docker[-clean] - ensures all docker images are available[/cleaned]
#- docker-list - generates a list of docker images that 'make docker' produces
#- peer-docker[-clean] - ensures the peer container is available[/cleaned]
#- orderer-docker[-clean] - ensures the orderer container is available[/cleaned]
#- tools-docker[-clean] - ensures the tools container is available[/cleaned]
#- protos - generate all protobuf artifacts based on .proto files
#- clean - cleans the build area
#- clean-all - superset of 'clean' that also removes persistent state
#- dist-clean - clean release packages for all target platforms
#- unit-test-clean - cleans unit test state (particularly from docker)
#- basic-checks - performs basic checks like license, spelling and linter
#- enable_ci_only_tests - triggers unit-tests in downstream jobs. Applicable only for CI not to use in the local machine.
#- docker-thirdparty - pulls thirdparty images (kafka,zookeeper,couchdb)
#- docker-tag-latest - re-tags the images made by 'make docker' with the :latest tag
#- help-docs - generate the command reference docs

熟悉make的小伙伴肯定對(duì)這些不會(huì)陌生了,對(duì)于不熟悉的只需要記住make release就可以解決二進(jìn)制不用墻的問題就好了。

謝謝

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 簡介 此項(xiàng)目是一個(gè)模擬公民身份信息鏈的區(qū)塊鏈項(xiàng)目 github 地址: https://github.com/ak...
    CrazyWolf_46a9閱讀 8,911評(píng)論 0 0
  • Android 自定義View的各種姿勢(shì)1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 179,291評(píng)論 25 708
  • 用兩張圖告訴你,為什么你的 App 會(huì)卡頓? - Android - 掘金 Cover 有什么料? 從這篇文章中你...
    hw1212閱讀 14,084評(píng)論 2 59
  • 1、通過CocoaPods安裝項(xiàng)目名稱項(xiàng)目信息 AFNetworking網(wǎng)絡(luò)請(qǐng)求組件 FMDB本地?cái)?shù)據(jù)庫組件 SD...
    陽明AI閱讀 16,223評(píng)論 3 119
  • 敬愛的李老師,智慧的馬教授,親愛的家人們:大家好,我是華夏煒燁機(jī)械有限公司的張文亮,今天是我日精進(jìn)第5天,跟大家分...
    亮_4094閱讀 147評(píng)論 0 0

友情鏈接更多精彩內(nèi)容