This article mainly introduces how to use the Package Manager to install node. js in linux and the specific installation process. It is very detailed and recommended to you. If you need it, refer to it. In the online article, install node in linux. js uses source code compilation. In fact, the node package manager has been provided on github to install node in various systems. js method.
1. In Ubuntu, run the following command:
The Code is as follows:
Curl-sL https://deb.nodesource.com/setup | sudo bash-
Sudo apt-get install-y nodejs
To install the local component using npm, run the following command:
The Code is as follows:
Apt-get install-y build-essential
2. In Debian, run the following command:
The Code is as follows:
Apt-get install curl
Curl-sL https://deb.nodesource.com/setup | bash-
Apt-get install-y nodejs
To install the local component using npm, run the following command:
The Code is as follows:
Apt-get install-y build-essential
3. In RHEL, Fedora, and CentOS, run the following command:
The Code is as follows:
Curl-sL https://rpm.nodesource.com/setup | bash-
Yum install-y nodejs
To install the local component using npm, run the following command:
The Code is as follows:
Yum groupinstall 'development tool'
# The following line is executed in Fedora.
Sudo yum install nodejs npm
# The following line is executed in RHEL and CentOS.
Sudo yum install nodejs npm -- enablerepo = epel
However, in CentOS6
The Code is as follows:
Sudo yum install nodejs npm -- enablerepo = epel
An error is reported, but not executed. You can also use npm.
4. Use the following command in openSUSE and lupus erythematosus:
The Code is as follows:
Sudo zypper ar \
Http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1 \
Node. js
Sudo zypper in nodejs-devel
5. In Arch Linux, run the following command:
The Code is as follows:
Pacman-S nodejs
6. In FreeBSD and OpenBSD, run the following command:
The Code is as follows:
/Usr/ports/www/node
Cd/usr/ports/www/node-devel/& make install clean
# Or
Pkg_add-r node-devel
Pkg install node
# Or
Pkg install node-devel
The above is all the content of this article. I hope you will like it.