github.com/myafeier/fabric@v1.0.1-0.20170722181825-3a4b1f2bce86/docs/source/prereqs.rst (about) 1 Prerequisites 2 ============= 3 4 Install cURL 5 ------------ 6 7 Download the `cURL <https://curl.haxx.se/download.html>`__ tool if not 8 already installed. 9 10 .. note:: If you're on Windows please see the specific note on `Windows 11 extras`_ below. 12 13 Docker and Docker Compose 14 ------------------------- 15 16 You will need the following installed on the platform on which you will be 17 operating, or developing on (or for), Hyperledger Fabric: 18 19 - MacOSX, *nix, or Windows 10: `Docker <https://www.docker.com/products/overview>`__ 20 v1.12 or greater is required. 21 - Older versions of Windows: `Docker 22 Toolbox <https://docs.docker.com/toolbox/toolbox_install_windows/>`__ - 23 again, Docker version v1.12 or greater is required. 24 25 You can check the version of Docker you have installed with the following 26 command from a terminal prompt: 27 28 .. code:: bash 29 30 docker --version 31 32 .. note:: Installing Docker for Mac or Windows, or Docker Toolbox will also 33 install Docker Compose. If you already had Docker installed, you 34 should check that you have Docker Compose version 1.8 or greater 35 installed. If not, we recommend that you install a more recent 36 version of Docker. 37 38 You can check the version of Docker Compose you have installed with the 39 following command from a terminal prompt: 40 41 .. code:: bash 42 43 docker-compose --version 44 45 .. _Golang: 46 47 Go Programming Language 48 ----------------------- 49 50 Hyperledger Fabric uses the Go programming language 1.7.x for many of its 51 components. 52 53 .. note: Go version 1.8.x will yield test failures 54 55 - `Go <https://golang.org/>`__ - version 1.7.x 56 57 Given that we are writing a Go chaincode program, we need to be sure that the 58 source code is located somewhere within the ``$GOPATH`` tree. First, you will 59 need to check that you have set your ``$GOPATH`` environment variable. 60 61 .. code:: bash 62 echo $GOPATH 63 /Users/xxx/go 64 65 If nothing is displayed when you echo ``$GOPATH``, you will need to set it. 66 Typically, the value will be a directory tree child of your development 67 workspace, if you have one, or as a child of your $HOME directory. Since we'll 68 be doing a bunch of coding in Go, you might want to add the following to your 69 ``~/.bashrc``: 70 71 .. code:: bash 72 73 export GOPATH=$HOME/go 74 export PATH=$PATH:$GOPATH/bin 75 76 Node.js Runtime and NPM 77 ----------------------- 78 79 If you will be developing applications for Hyperledger Fabric leveraging the 80 Hyperledger Fabric SDK for Node.js, you will need to have version 6.9.x of Node.js 81 installed. 82 83 .. note:: Node.js version 7.x is not supported at this time. 84 85 - `Node.js <https://nodejs.org/en/download/>`__ - version 6.9.x or greater 86 87 .. note:: Installing Node.js will also install NPM, however it is recommended 88 that you confirm the version of NPM installed. You can upgrade 89 the ``npm`` tool with the following command: 90 91 .. code:: bash 92 93 npm install npm@3.10.10 -g 94 95 Windows extras 96 -------------- 97 98 If you are developing on Windows, you may also need the following which 99 provides a better alternative to the built-in Windows tools: 100 101 - `Git Bash <https://git-scm.com/downloads>`__ 102 103 .. note:: On older versions of Windows, such as Windows 7, you 104 typically get this as part of installing Docker 105 Toolbox. However experience has shown this to be a poor 106 development environment with limited functionality. It is 107 suitable to run Docker based scenarios, such as 108 :doc:`getting_started`, but you may not be able to find a 109 suitable ``make`` command. 110 111 Before running any ``git clone`` commands, run the following commands: 112 113 :: 114 115 git config --global core.autocrlf false 116 git config --global core.longpaths true 117 118 You can check the setting of these parameters with the following commands: 119 120 :: 121 122 git config --get core.autocrlf 123 git config --get core.longpaths 124 125 These need to be ``false`` and ``true`` respectively. 126 127 The ``curl`` command that comes with Git and Docker Toolbox is old and 128 does not handle properly the redirect used in 129 :doc:`getting_started`. Make sure you install and use a newer version 130 from the `cURL downloads page <https://curl.haxx.se/download.html>`__ 131 132 For Node.js you also need the necessary Visual Studio C++ Build Tools 133 which are freely available and can be installed with the following 134 command: 135 136 .. code:: bash 137 138 npm install --global windows-build-tools 139 140 See the `NPM windows-build-tools page 141 <https://www.npmjs.com/package/windows-build-tools>`__ for more 142 details. 143 144 .. Licensed under Creative Commons Attribution 4.0 International License 145 https://creativecommons.org/licenses/by/4.0/