|
| 1 | +# Node.js Bootstrapping Guide |
| 2 | + |
| 3 | +## Windows |
| 4 | + |
| 5 | +A [Boxstarter][] script can be used for easy setup of Windows systems with all |
| 6 | +the required prerequisites for Node.js development. This script will install |
| 7 | +the following [Chocolatey] packages: |
| 8 | + * [Git for Windows][] with the `git` and Unix tools added to the `PATH` |
| 9 | + * [Python 2.x][] |
| 10 | + * [Visual Studio 2017 Build Tools][] with [Visual C++ workload][] |
| 11 | + |
| 12 | +To install Node.js prerequisites using [Boxstarter WebLauncher][], just open |
| 13 | +[this link](http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter) |
| 14 | +with Internet Explorer or Edge browser on the target machine. |
| 15 | + |
| 16 | +Alternatively, you can use PowerShell. Run those commands from an elevated |
| 17 | +PowerShell terminal: |
| 18 | +```console |
| 19 | +Set-ExecutionPolicy Unrestricted -Force |
| 20 | +iex ((New-Object System.Net.WebClient).DownloadString('http://boxstarter.org/bootstrapper.ps1')) |
| 21 | +get-boxstarter -Force |
| 22 | +Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter -DisableReboots |
| 23 | +``` |
| 24 | + |
| 25 | +Entire installation will take up about 8 GB of disk space. |
| 26 | + |
| 27 | +## Linux |
| 28 | + |
| 29 | +For building Node.js on Linux, following packages are required (note, that this |
| 30 | +can vary from distribution to distribution): |
| 31 | + * `git` |
| 32 | + * `python` |
| 33 | + * `gcc-c++` or `g++` |
| 34 | + * `make` |
| 35 | + |
| 36 | +To bootstrap Node.js on Linux, run in terminal: |
| 37 | + * OpenSUSE: `sudo zypper install git python gcc-c++ make` |
| 38 | + * Fedora: `sudo dnf install git python gcc-c++ make` |
| 39 | + * Ubuntu, Debian: `sudo apt-get install git python g++ make` |
| 40 | + |
| 41 | +## macOS |
| 42 | + |
| 43 | +To install required tools on macOS, run in terminal: |
| 44 | +```console |
| 45 | +xcode-select --install |
| 46 | +``` |
| 47 | + |
| 48 | +[Boxstarter]: http://boxstarter.org/ |
| 49 | +[Boxstarter WebLauncher]: http://boxstarter.org/WebLauncher |
| 50 | +[Chocolatey]: https://chocolatey.org/ |
| 51 | +[Git for Windows]: https://chocolatey.org/packages/git |
| 52 | +[Python 2.x]: https://chocolatey.org/packages/python2 |
| 53 | +[Visual Studio 2017 Build Tools]: https://chocolatey.org/packages/visualstudio2017buildtools |
| 54 | +[Visual C++ workload]: https://chocolatey.org/packages/visualstudio2017-workload-vctools |
| 55 | + |
0 commit comments