github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/docs/source/install.rst (about) 1 Install Samples, Binaries, and Docker Images 2 ============================================ 3 4 While we work on developing real installers for the Hyperledger Fabric 5 binaries, we provide a script that will download and install samples and 6 binaries to your system. We think that you'll find the sample applications 7 installed useful to learn more about the capabilities and operations of 8 Hyperledger Fabric. 9 10 11 .. note:: If you are running on **Windows** you will want to make use of the 12 Docker Quickstart Terminal for the upcoming terminal commands. 13 Please visit the :doc:`prereqs` if you haven't previously installed 14 it. 15 16 If you are using Docker Toolbox or macOS, you 17 will need to use a location under ``/Users`` (macOS) when installing and running the samples. 18 19 If you are using Docker for Mac, you will need to use a location 20 under ``/Users``, ``/Volumes``, ``/private``, or ``/tmp``. To use a different 21 location, please consult the Docker documentation for 22 `file sharing <https://docs.docker.com/docker-for-mac/#file-sharing>`__. 23 24 If you are using Docker for Windows, please consult the Docker 25 documentation for `shared drives <https://docs.docker.com/docker-for-windows/#shared-drives>`__ 26 and use a location under one of the shared drives. 27 28 Determine a location on your machine where you want to place the `fabric-samples` 29 repository and enter that directory in a terminal window. The 30 command that follows will perform the following steps: 31 32 #. If needed, clone the `hyperledger/fabric-samples <https://github.com/hyperledger/fabric-samples>`_ repository 33 #. Checkout the appropriate version tag 34 #. Install the Hyperledger Fabric platform-specific binaries and config files 35 for the version specified into the /bin and /config directories of fabric-samples 36 #. Download the Hyperledger Fabric docker images for the version specified 37 38 Once you are ready, and in the directory into which you will install the 39 Fabric Samples and binaries, go ahead and execute the command to pull down 40 the binaries and images. 41 42 .. note:: If you want the latest production release, omit all version identifiers. 43 44 .. code:: bash 45 46 curl -sSL https://bit.ly/2ysbOFE | bash -s 47 48 .. note:: If you want a specific release, pass a version identifier for Fabric and Fabric-CA docker images. 49 The command below demonstrates how to download the latest production releases - 50 **Fabric v2.2.1** and **Fabric CA v1.4.9** 51 52 .. code:: bash 53 54 curl -sSL https://bit.ly/2ysbOFE | bash -s -- <fabric_version> <fabric-ca_version> 55 curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.2.2 1.4.9 56 57 .. note:: If you get an error running the above curl command, you may 58 have too old a version of curl that does not handle 59 redirects or an unsupported environment. 60 61 Please visit the :doc:`prereqs` page for additional 62 information on where to find the latest version of curl and 63 get the right environment. Alternately, you can substitute 64 the un-shortened URL: 65 https://raw.githubusercontent.com/hyperledger/fabric/{BRANCH}/scripts/bootstrap.sh 66 67 .. note:: For additional use pattern you can use the -h flag to view the help and available commands for the 68 Fabric-Samples bootstrap script. For example: 69 ``curl -sSL https://bit.ly/2ysbOFE | bash -s -- -h`` 70 71 The command above downloads and executes a bash script 72 that will download and extract all of the platform-specific binaries you 73 will need to set up your network and place them into the cloned repo you 74 created above. It retrieves the following platform-specific binaries: 75 76 * ``configtxgen``, 77 * ``configtxlator``, 78 * ``cryptogen``, 79 * ``discover``, 80 * ``idemixgen`` 81 * ``orderer``, 82 * ``peer``, 83 * ``fabric-ca-client``, 84 * ``fabric-ca-server`` 85 86 and places them in the ``bin`` sub-directory of the current working 87 directory. 88 89 You may want to add that to your PATH environment variable so that these 90 can be picked up without fully qualifying the path to each binary. e.g.: 91 92 .. code:: bash 93 94 export PATH=<path to download location>/bin:$PATH 95 96 Finally, the script will download the Hyperledger Fabric docker images from 97 `Docker Hub <https://hub.docker.com/u/hyperledger/>`__ into 98 your local Docker registry and tag them as 'latest'. 99 100 The script lists out the Docker images installed upon conclusion. 101 102 Look at the names for each image; these are the components that will ultimately 103 comprise our Hyperledger Fabric network. You will also notice that you have 104 two instances of the same image ID - one tagged as "amd64-1.x.x" and 105 one tagged as "latest". Prior to 1.2.0, the image being downloaded was determined 106 by ``uname -m`` and showed as "x86_64-1.x.x". 107 108 .. note:: On different architectures, the x86_64/amd64 would be replaced 109 with the string identifying your architecture. 110 111 .. note:: If you have questions not addressed by this documentation, or run into 112 issues with any of the tutorials, please visit the :doc:`questions` 113 page for some tips on where to find additional help. 114 115 .. Licensed under Creative Commons Attribution 4.0 International License 116 https://creativecommons.org/licenses/by/4.0/