How to install node. js on LinuxPosted on November, by Dan Nanni Leave a comment
Question:How can I install node. js on [insert your Linux distro]?
node. JS is a server-side software platform built on Google ' s V8 JavaScript engine. node. JS has become a popular choice for building high-performance server-side applications all in JavaScript. What makes node. js even more attractive for backend server development is the huge ecosystem of node. JS Libraries and APPL Ications. node. JS comes with a command line utility called NPM which allows do easily install, Version-control, and man Age dependencies of node. JS libraries and applications from the vast npm online repository.
In this tutorial, I'll describe how to install node. js on major Linux distros including Debian, Ubuntu, Fedora and C Entos.
Node. JS is available as a pre-built the package on some distros (e.g., Fedora or Ubuntu), while you need to install it from it s source on other distros. As node. JS is fast evolving, it's recommended to install the latest node. js from its source, instead of installing a out Dated pre-built package. The lasted node. js comes with npm (node. JS Package Manager) bundled, allowing-install external node. JS MoD Ules easily.
Install node. js on Debian
Starting from Debian 8 (Jessie), node. JS is available in the official repositories. Thus You can install it with:
$ sudo apt-get install NPM
On the Debian 7 (Wheezy) or earlier, you can install node. js from its source as follows.
$ sudo apt-get install Python g++ make
$ wget http://nodejs.org/dist/node-latest.tar.gz
$ tar xvfvz node-latest.tar.gz
$ CD node-v0.10.21 (replace a version with your own)
$./configure
$ make
$ sudo make installinstall node. js on Ubuntu or Linux Mint
node. JS is included in Ubuntu (13.04 and higher). Thus installation is straightforward. The following would install node. js and npm.
$ sudo apt-get install NPM
$ sudo ln-s/usr/bin/nodejs/usr/bin/node
While the stock Ubuntu ships node. js, you can install a more recent version from its PPA.
$ sudo apt-get install python-software-properties python g++ make
$ sudo add-apt-repository-y ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install npminstall node. js on Fedora
node. JS is included in the base repository of Fedora. Therefore You can use the yum to install node. js on Fedora.
$ sudo yum install NPM
If you want to install the latest version of node. js, you can build it from its source as follows.
$ sudo yum groupinstall ' development Tools '
$ wget http://nodejs.org/dist/node-latest.tar.gz
$ tar xvfvz node-latest.tar.gz
$ cd node-v0.10.21 (replace a version with your own)
$./configure
$ Make
$ sudo make installInstall node. js on CentOS or RHEL
To install node. js with Yum Package Manager on CentOS, first enable EPEL repository, and then run:
$ sudo yum install NPM
If you want to build the latest node. js on CentOS, follow the same procedure as in Fedora.
Install node. js on Arch Linux
Node. JS is available in the Arch Linux community repository. Thus installation is as simple as running:
$ sudo pacman-s nodejs npmcheck the Version of node. js
Once you have installed node. js, you can check for node. js version as follows
On EC2 instance, if need to do:
sudo ln-S/Usr/Local/Bin/Node/Usr/Bin/Nodesudo Ln-S/Usr/Local/Lib/Node/Usr/Lib/Nodesudo Ln-s /usr/ local/bin/NPM /usr/bin/ npmsudo ln -s /usr/local/bin/ node-waf /usr /bin/node- waf
How to install node. js on Linux