github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/docs/source/install.md (about) 1 # Install Fabric and Fabric Samples 2 3 Please install the [Prerequisites](./prereqs.html) before following these install instructions. 4 5 We think the best way to understand something is to use it yourself. To help you use Fabric, we have created a simple Fabric test network using docker compose, and a set of sample applications that demonstrate its core capabilities. 6 We have also precompiled `Fabric CLI tool binaries` and `Fabric Docker Images` which will be downloaded to your environment, to get you going. 7 8 The cURL command in the instructions below sets up your environment so that you can run the Fabric test network. Specifically, it performs the following steps: 9 * Clones the [hyperledger/fabric-samples](https://github.com/hyperledger/fabric-samples) repository. 10 * Downloads the latest Hechain Docker images and tags them as `latest` 11 * Downloads the following platform-specific Hechain CLI tool binaries and config files into the `fabric-samples` `/bin` and `/config` directories. These binaries will help you interact with the test network. 12 * `configtxgen`,<br> 13 * `configtxlator`,<br> 14 * `cryptogen`,<br> 15 * `discover`,<br> 16 * `idemixgen`,<br> 17 * `orderer`,<br> 18 * `osnadmin`,<br> 19 * `peer`,<br> 20 * `fabric-ca-client`,<br> 21 * `fabric-ca-server`<br> 22 23 24 ## Download Fabric samples, docker images, and binaries. 25 26 Download `fabric-samples` to the `$HOME/go/src/github.com/<your_github_userid>` directory. This is a Golang Community recommendation for Go projects. If you are using a different directory or Windows, see the [Notes](https://hyperledger-fabric.readthedocs.io/en/latest/install.html#notes) below. 27 28 ```shell 29 $ mkdir -p $HOME/go/src/github.com/<your_github_userid> 30 $ cd $HOME/go/src/github.com/<your_github_userid> 31 ``` 32 33 Download the latest release of Fabric samples, docker images, and binaries. 34 35 ```shell 36 $ curl -sSL https://bit.ly/2ysbOFE | bash -s 37 ``` 38 39 You have completed installing Fabric samples, docker images, and binaries to your system. 40 41 ## Advanced download options 42 43 To view the help and available commands for the download script, please use the `-h` flag with the cURL command: 44 45 ```shell 46 curl -sSL https://bit.ly/2ysbOFE | bash -s -- -h 47 ``` 48 49 To download a specific release, pass a version identifier for Fabric and Fabric CA Docker images. The command below demonstrates how to download the latest production releases - `Fabric v2.4.3` and `Fabric CA v1.5.2` 50 51 ```shell 52 curl -sSL https://bit.ly/2ysbOFE | bash -s -- <fabric_version> <fabric-ca_version> 53 curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.4.3 1.5.2 54 ``` 55 56 ## Notes 57 58 ### Other considerations 59 60 * Setting GOPATH is not required when using Go modules in your projects, or when using the recommended directory. If you would like to use a different location for fabric-samples, you may set GOPATH to point to your specific Go workspace. For example on macOS: 61 62 ```shell 63 $ export GOPATH:$Home/<user-defined-workspace>/go 64 ``` 65 66 * If you are looking to set up your environment to start contributing to Fabric, please refer to the instructions for [Setting up the contributor development environment](https://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html). 67 68 ## Troubleshooting 69 70 * If you get an error running the cURL command 71 * You may have too old a version of cURL that does not handle redirects or an unsupported environment. Please make sure you use a newer version from the [cURL downloads page](https://curl.haxx.se/download.html) 72 * Alternately, there might be an issue with the bit.ly, please retry the command with the un-shortened URL: 73 ```shell 74 curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/bootstrap.sh| bash -s 75 ``` 76 77 * If you need help, post your questions and share your logs on the **fabric-questions** channel on [Hyperledger Rocket Chat](https://chat.hyperledger.org/home) or on [StackOverflow](https://stackoverflow.com/questions/tagged/hyperledger-fabric). 78 79 <!--- Licensed under Creative Commons Attribution 4.0 International License 80 https://creativecommons.org/licenses/by/4.0/ -->