How to install Node.js_node.js on Linux

Source: Internet
Author: User
Tags install node arch linux linux mint

Node.js is built on Google's V8 JavaScript engine server-side software platform. Node.js is already the preferred option in JavaScript for building high-performance server-side applications. What makes it so popular to develop server backgrounds with a huge ecosystem of node.js libraries and applications. Node.js comes with a command-line tool called NPM that lets you easily install it, build control, and use NPM's online warehouse to manage the dependencies of Node.js libraries and applications.

In this tutorial, I'll explain how to install Node.js on the mainstream Linux distribution, including Debian,ubuntu,fedora and CentOS .

Node.js has a pre-built package (such as Fedora or Ubuntu) on some distributions, and you need to install it on other distributions via the source code. Since node.js is developing faster, it is recommended that you install the latest version of the source code instead of installing an outdated, pre-built package. The latest node.js with NPM (Node.js's package manager) allows you to easily install Node.js external modules.

Install Node.js on Debian

Starting with Debian 8 (Jessie), Node.js has been incorporated into the official software repository. Therefore, you can install it in the following ways:

$ sudo apt-get install NPM
In a previous version of Debian 7 (wheezy), you would need to install the source code in the following way:

$ sudo apt-get install python g++ make
$ wget http://nodejs.org/dist/node-latest.tar.gz
$ tar xvfvz node-latest.t Ar.gz
$ cd node-v0.10.21 (replace a version with your own)
$./configure
$ make
$ sudo make install

Install Node.js in Ubuntu or Linux Mint

Node.js is included in Ubuntu (13.04 and later). Therefore, the installation is very simple. Node.js and NPM will be installed in the following ways.

$ sudo apt-get install npm
$ sudo ln-s/usr/bin/nodejs/usr/bin/node

While the node.js in Ubuntu may be older, you can install the latest 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 NPM

Installing Node.js in Fedora

The Node.js is included in Fedora's base warehouse. Therefore, you can install Node.js with Yum in Fedora.

$ sudo yum install NPM
If you want to install the latest version of Node.js, follow these steps to install it using the source code.

$ 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 i Nstall

Install Node.js in CentOS or RHEL

In CentOS use Yum Package Manager to install Node.js, first enable the Epel Software Library, and then run:

$ sudo yum install NPM
If you want to install the latest version of Node.js in CentOS, the installation steps are the same as in Fedora.

Install Node.js on Arch Linux

Node.js can be found in the Community Library of Arch Linux. So the installation is simple, just run:

$ sudo pacman-s nodejs npm
Check the Node.js version

Once you have installed the Node.js, you can check the Node.js version using the method shown below.

$ node--version

The above is the installation of Node.js on Linux related content, I hope to help you learn.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.