fabric二進制工具tips

fabric二進制工具

我們在跑demo的時候瞬场,會用到fabric的二進制工具紊遵,比如:

  • configtxgen
  • configtxlator
  • cryptogen
    ... 等等

這些二進制工具在官方教程或者網(wǎ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

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

首先從github上面獲取fabric源碼

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

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

make release

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

那為什么我們執(zhí)行make release就可以生成了呢衩椒,那是因為在Makefile文件中,已經(jīng)給我們標注出來了哮兰,當參數(shù)是release時候毛萌,會生成自身平臺對應(yīng)的二進制工具。

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的小伙伴肯定對這些不會陌生了阁将,對于不熟悉的只需要記住make release就可以解決二進制不用墻的問題就好了。

謝謝

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末右遭,一起剝皮案震驚了整個濱河市做盅,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌窘哈,老刑警劉巖吹榴,帶你破解...
    沈念sama閱讀 221,888評論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異滚婉,居然都是意外死亡图筹,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,677評論 3 399
  • 文/潘曉璐 我一進店門让腹,熙熙樓的掌柜王于貴愁眉苦臉地迎上來远剩,“玉大人,你說我怎么就攤上這事哨鸭∶袼蓿” “怎么了?”我有些...
    開封第一講書人閱讀 168,386評論 0 360
  • 文/不壞的土叔 我叫張陵像鸡,是天一觀的道長笋籽。 經(jīng)常有香客問我,道長偎血,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 59,726評論 1 297
  • 正文 為了忘掉前任着绷,我火速辦了婚禮,結(jié)果婚禮上锌云,老公的妹妹穿的比我還像新娘荠医。我一直安慰自己,他們只是感情好桑涎,可當我...
    茶點故事閱讀 68,729評論 6 397
  • 文/花漫 我一把揭開白布彬向。 她就那樣靜靜地躺著,像睡著了一般攻冷。 火紅的嫁衣襯著肌膚如雪娃胆。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,337評論 1 310
  • 那天等曼,我揣著相機與錄音里烦,去河邊找鬼。 笑死禁谦,一個胖子當著我的面吹牛胁黑,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播州泊,決...
    沈念sama閱讀 40,902評論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼丧蘸,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了遥皂?” 一聲冷哼從身側(cè)響起触趴,我...
    開封第一講書人閱讀 39,807評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎渴肉,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體爽冕,經(jīng)...
    沈念sama閱讀 46,349評論 1 318
  • 正文 獨居荒郊野嶺守林人離奇死亡仇祭,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,439評論 3 340
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了颈畸。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片乌奇。...
    茶點故事閱讀 40,567評論 1 352
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖眯娱,靈堂內(nèi)的尸體忽然破棺而出礁苗,到底是詐尸還是另有隱情,我是刑警寧澤徙缴,帶...
    沈念sama閱讀 36,242評論 5 350
  • 正文 年R本政府宣布试伙,位于F島的核電站,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏疏叨。R本人自食惡果不足惜潘靖,卻給世界環(huán)境...
    茶點故事閱讀 41,933評論 3 334
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望蚤蔓。 院中可真熱鬧卦溢,春花似錦、人聲如沸秀又。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,420評論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽吐辙。三九已至宣决,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間袱讹,已是汗流浹背疲扎。 一陣腳步聲響...
    開封第一講書人閱讀 33,531評論 1 272
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留捷雕,地道東北人椒丧。 一個月前我還...
    沈念sama閱讀 48,995評論 3 377
  • 正文 我出身青樓,卻偏偏與公主長得像救巷,于是被迫代替她去往敵國和親壶熏。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 45,585評論 2 359

推薦閱讀更多精彩內(nèi)容

  • 簡介 此項目是一個模擬公民身份信息鏈的區(qū)塊鏈項目 github 地址: https://github.com/ak...
    CrazyWolf_46a9閱讀 8,765評論 0 0
  • Android 自定義View的各種姿勢1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 172,298評論 25 707
  • 用兩張圖告訴你浦译,為什么你的 App 會卡頓? - Android - 掘金 Cover 有什么料棒假? 從這篇文章中你...
    hw1212閱讀 12,745評論 2 59
  • 1、通過CocoaPods安裝項目名稱項目信息 AFNetworking網(wǎng)絡(luò)請求組件 FMDB本地數(shù)據(jù)庫組件 SD...
    陽明先生_X自主閱讀 15,988評論 3 119
  • 敬愛的李老師精盅,智慧的馬教授帽哑,親愛的家人們:大家好,我是華夏煒燁機械有限公司的張文亮叹俏,今天是我日精進第5天妻枕,跟大家分...
    亮_4094閱讀 137評論 0 0