## 釋義
peer命令幫助管理員對Fabric區塊鏈網絡中的節點進行管理,根據管理任務的 不同,peer命令細分為5個子命令。
## 語法
```shell
peer chaincode [option] [flags]
peer channel [option] [flags]
peer logging [option] [flags]
peer node [option] [flags]
peer version [option] [flags]
```
每個子命令都有不同的選項(option),出于簡化考慮,有時我們將命令、子命令 或子命令選項都稱為命令。
如果運行某個子命令時沒有指定選項,那么它將返回相關的幫助信息。
每個peer子命令都有一套自己的標志,其中許多標志被有意設計為全局標志, 以便可以在所有的子命令中使用該標志。我們將在相關的peer子命令中介紹這些標志。
peer命令的頂層標志如下:
* help:使用--help標志獲取任何peer命令的幫助信息,該標志非常有價值,你可以用它 獲得命令、子命令乃至選項的幫助
例如:
```shell
peer --help
peer channel --help
peer channel list --help
```
## 示例
下面的命令使用--help標志查看`peer channel join`命令的幫助信息:
~~~
~$ peer channel join --help
~~~
你可以在終端看到如下的幫助文本:
~~~
Joins the peer to a channel.
Usage:
peer channel join [flags]
Flags:
-b, --blockpath string Path to file containing genesis block
-h, --help help for join
Global Flags:
--cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--certfile string Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
--clientauth Use mutual TLS when communicating with the orderer endpoint
--connTimeout duration Timeout for client to connect (default 3s)
--keyfile string Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
-o, --orderer string Ordering service endpoint
--ordererTLSHostnameOverride string The hostname override to use when validating the TLS connection to the orderer.
--tls Use TLS when communicating with the orderer endpoint
~~~
- Fabric命令手冊
- Peer命令
- peer
- peer node
- peer node start
- peer node status
- peer channel
- peer channel create
- peer channel fetch
- peer channel getinfo
- peer channel join
- peer channel list
- peer channel signconfigtx
- peer channel update
- peer chaincode
- peer chaincode install
- peer chaincode instantiate
- peer chaincode invoke
- peer chaincode list
- peer chaincode package
- peer chaincode query
- peer chaincode signpackage
- peer chaincode upgrade
- peer version
- peer logging
- peer logging getlevel
- peer logging revertlevels
- peer logging setlevel
- Configtxgen命令
- configtxgen
- Configtxlator命令
- configtxlator
- configtxlator start
- configtxlator proto_encode
- configtxlator proto_decode
- configtxlator compute_update
- configtxlator version
- Cryptogen命令
- cryptogen
- cryptogen help
- cryptogen generate
- cryptogen showtemplate
- FabricCA命令
- fabric-ca-client
- fabric-ca-server