Hướng dẫn cài đặt nodejs Informational, Commercial
Copyright OpenJS Foundation and Node.js contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation, please see our Trademark Policy and Trademark List. Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them. Show The OpenJS Foundation | Trademark Policy | Privacy Policy | Code of Conduct | Security Reporting Note: The packages on this page are maintained and supported by their respective packagers, not the Node.js core team. Please report any issues you encounter to the package maintainer. If it turns out your issue is a bug in Node.js itself, the maintainer will report the issue upstream. Alpine LinuxNode.js LTS and npm packages are available in the Main Repository.
Node.js Current can be installed from the Community Repository.
AndroidAndroid support is still experimental in Node.js, so precompiled binaries are not yet provided by Node.js developers. However, there are some third-party solutions. For example, Termux community provides terminal emulator and Linux environment for Android, as well as own package manager and extensive collection of many precompiled applications. This command in Termux app will install the last available Node.js version:
Currently, Termux Node.js binaries are linked against
7 (depending on
8 package). Arch LinuxNode.js and npm packages are available in the Community Repository.
CentOS, Fedora and Red Hat Enterprise LinuxNode.js is available as a module called
9 in CentOS/RHEL 8 and Fedora.
where
0 corresponds to the major version of Node.js. To see a list of available streams:
For example, to install Node.js 18:
AlternativesThese resources provide packages compatible with CentOS, Fedora, and RHEL.
Debian and Ubuntu based Linux distributionsNode.js binary distributions are available from NodeSource. AlternativesPackages compatible with Debian and Ubuntu based Linux distributions are available via . fnmFast and simple Node.js version manager built in Rust used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch Node versions automatically based on the current directory, etc. To install fnm, use this . fnm has cross-platform support (macOS, Windows, Linux) & all popular shells (Bash, Zsh, Fish, PowerShell, Windows Command Line Prompt). fnm is built with speed in mind and compatibility support for
1 and
2 files. FreeBSDThe most recent release of Node.js is available via the www/node port. Install a binary package via pkg:
Or compile it on your own using ports:
GentooNode.js is available in the portage tree.
IBM iLTS versions of Node.js are available from IBM, and are available via the 'yum' package manager. The package name is
9 followed by the major version number (for instance,
4,
5 etc) To install Node.js 14.x from the command line, run the following as a user with *ALLOBJ special authority:
0 Node.js can also be installed with the IBM i Access Client Solutions product. See this support document for more details macOSDownload the directly from the nodejs.org web site. If you want to download the package with bash:
1 AlternativesUsing Homebrew:
2 Using MacPorts:
3 Using pkgsrc: Install the binary package:
4 Or build manually from pkgsrc:
5 n
6 is a simple to use Node.js version manager for Mac and Linux. Specify the target version to install using a rich syntax, or select from a menu of previously downloaded versions. The versions are installed system-wide or user-wide, and for more targeted use you can run a version directly from the cached downloads. See the homepage for install methods (bootstrap, npm, Homebrew, third-party), and all the usage details. If you already have
7 then installing
6 and then the newest LTS
9 version is as simple as:
6 NetBSDNode.js is available in the pkgsrc tree:
7 Or install a binary package (if available for your platform) using pkgin:
4 Nodenv
0 is a lightweight node version manager, similar to
1. It's simple and predictable. A rich plugin ecosystem lets you tailor it to suit your needs. Use
0 to pick a Node version for your application and guarantee that your development environment matches production. Nodenv installation instructions are maintained . Please visit that page to ensure you're following the latest version of the installation steps. nvmNode Version Manager is a bash script used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch version, etc. To install nvm, use this . On Unix / OS X systems Node.js built from source can be installed using nvm by installing into the location that nvm expects:
9 After this you can use
1 to switch between released versions and versions built from source. For example, if the version of Node.js is v8.0.0-pre:
0 Once the official release is out you will want to uninstall the version built from source:
1 nvsWindowsThe
4 version manager is cross-platform and can be used on Windows, macOS, and Unix-like systems To install
4 on Windows go to the release page here and download the MSI installer file of the latest release. You can also use
6 to install it:
2 macOS,UnixLikeYou can find the documentation regarding the installation steps of
4 in macOS/Unix-like systems UsageAfter this you can use
4 to switch between different versions of node. To add the latest version of node:
3 Or to add the latest LTS version of node:
4 Then run the
9 command to add a version of node to your
0 for the current shell:
5 To add it to
0 permanently, use
2:
6 OpenBSDNode.js is available through the ports system.
7 Using pkg_add on OpenBSD:
8 openSUSE and SLENode.js is available in the main repositories under the following packages:
For example, to install Node.js 14.x on openSUSE Leap 15.2, run the following as root:
9 Different major versions of Node can be installed and used concurrently. SmartOS and illumosSmartOS images come with pkgsrc pre-installed. On other illumos distributions, first install pkgsrc, then you may install the binary package as normal:
4 Or build manually from pkgsrc:
5 SnapNode.js snaps are available as
9 on the Snap store. SolusSolus provides Node.js in its main repository.
2 Void LinuxVoid Linux ships Node.js stable in the main repository.
3 WindowsDownload the directly from the nodejs.org web site. AlternativesUsing Winget:
4 After running one of the two commands above, it may be necessary to restart the terminal emulator before the
9 CLI command becomes available. Using Chocolatey:
5 Using Scoop:
6 z/OSIBM® SDK for Node.js - z/OS® is available in two installation formats, SMP/E and PAX. Select the installation format that applies to you: |