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