Installing Node.js_node.js in Linux using the package Manager

Source: Internet
Author: User
Tags curl install node arch linux nodesource

On-line articles, install node.js under Linux are compiled using the source code, in fact, node GitHub already provided under each system to use their own Package Manager (Package Manager) to install the Node.js method.

1. In Ubuntu, use the following command:

Copy Code code as follows:

CURL-SL Https://deb.nodesource.com/setup | sudo bash-
sudo apt-get install-y Nodejs

If you need to install local components using NPM, you will also need to execute the following command:

Copy Code code as follows:

Apt-get install-y build-essential

2. In Debian, use the following command:

Copy Code code as follows:

Apt-get Install Curl
CURL-SL Https://deb.nodesource.com/setup | Bash-
Apt-get install-y Nodejs

If you need to install local components using NPM, you will also need to execute the following command:

Copy Code code as follows:

Apt-get install-y build-essential

3. In Rhel, Fedora, CentOS, use the following command:

Copy Code code as follows:

CURL-SL Https://rpm.nodesource.com/setup | Bash-
Yum Install-y Nodejs

If you need to install local components using NPM, you will also need to execute the following command:

Copy Code code as follows:

Yum Groupinstall ' Development Tools '
#下面这行是在Fedora中执行的
sudo yum install Nodejs NPM
#下面这行是在RHEL和CentOS中执行的
sudo yum install Nodejs npm--enablerepo=epel

But in practice, in CentOS6, the execution

Copy Code code as follows:

sudo yum install Nodejs npm--enablerepo=epel

An error is not performed, and NPM can also be used.

4. In openSUSE and SLE, use the following command:

Copy Code code as follows:

sudo zypper ar \
HTTP://DOWNLOAD.OPENSUSE.ORG/REPOSITORIES/DEVEL:/LANGUAGES:/NODEJS/OPENSUSE_13.1/\
Node.js
sudo zypper in Nodejs nodejs-devel

5. In Arch Linux, use the following command:

Copy Code code as follows:

Pacman-s Nodejs

6. In FreeBSD and OpenBSD, use the following command:

Copy Code code as follows:

/usr/ports/www/node
cd/usr/ports/www/node-devel/&& make install clean
#或者
Pkg_add-r Node-devel
PKG Install node
#或者
Pkg Install Node-devel

The above is the entire content of this article, I hope you can enjoy.

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.