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