How to install Node. js_node.js on Linux

Source: Internet
Author: User
Tags arch linux linux mint
This article mainly shares with you how to install Node. js on your Linux release? If you are interested, you can refer to Node. js, which is built on Google's V8 JavaScript engine server software platform. Node. js is the preferred solution in JavaScript for building high-performance server-side applications. What makes it so popular to use a huge ecosystem of Node. js libraries and applications to develop backend servers. Node. js comes with a command line tool called npm that allows you to easily install it, perform version control, and manage nodes using npm's online repository. dependencies between js libraries and applications.

In this tutorial, I will introduceHow to install Node. js on mainstream Linux distributions, including Debian, Ubuntu, Fedora, and CentOS.

Node. js has pre-built packages (such as Fedora or Ubuntu) on some releases, and you need to install them through source code on other releases. Because Node. js is developing fast, we recommend that you install the latest version from the source code instead of installing an outdated pre-built package. The latest Node. js comes with npm (Node. js Package Manager), allowing you to easily install the Node. js external module.

Install Node. js on Debian

Since Debian 8 (Jessie), Node. js has been incorporated into the official software repository. Therefore, you can install it as follows:

$ Sudo apt-get install npm
In versions earlier than Debian 7 (Wheezy), you need to use the following method for source code installation:

$ sudo apt-get install python g++ make$ wget$ tar xvfvz node-latest.tar.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. Install Node. js and npm in the following ways.

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

The Node. js version in Ubuntu may be old. 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

Install Node. js in Fedora

Node. js is included in the base repository of Fedora. Therefore, you can use yum to install Node. js 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$ tar xvfvz node-latest.tar.gz$ cd node-v0.10.21 (replace a version with your own)$ ./configure$ make$ sudo make install

Install Node. js in CentOS or RHEL

Use the yum Package Manager in CentOS to install Node. js. First enable the EPEL software library and then run:

$ Sudo yum install npm
If you want to install the latest Node. js version in CentOS, the installation steps are the same as those in Fedora.

Install Node. js on Arch Linux

Node. js can be found in the community library of Arch Linux. So the installation is very simple, as long as you run:

$ Sudo pacman-S nodejs npm
Check the Node. js version

Once you have installed Node. js, you can use the following method to check the Node. js version.

$ Node -- version

The above describes how to install Node. js on Linux. I hope it will be helpful for your learning.

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: 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.