Including Red Hat® Enterprise Linux® / RHEL, CentOS and Fedora.
Node.js is available from the NodeSource Enterprise Linux and Fedora binary distributions repository. Support for this repository, along with its scripts, can be found on GitHub at nodesource/distributions.
Note that the Node.js packages for EL 5 (RHEL5 and CentOS 5) depend on the EPEL repository being available. The setup script will check and provide instructions if it is not installed.
Run as root on RHEL, CentOS or Fedora:
curl --silent --location https://rpm.nodesource.com/setup | bash -
Then install, as root:
yum -y install nodejs
Including Red Hat® Enterprise Linux® / RHEL, CentOS and Fedora.
Node.js is available from the NodeSource Enterprise Linux and Fedora binary distributions repository. Support for this repository, along with its scripts, can be found on GitHub at nodesource/distributions.
Note that the Node.js packages for EL 5 (RHEL5 and CentOS 5) depend on the EPEL repository being available. The setup script will check and provide instructions if it is not installed.
Run as root on RHEL, CentOS or Fedora:
curl --silent --location https://rpm.nodesource.com/setup | bash -
Then install, as root:
yum -y install nodejs
[root@eel220825 bin]# sudo yum install nodejs npm --enablerepo=epel
Loaded plugins: fastestmirror, refresh-packagekit, security
Error getting repository data for epel, repository not found
[root@eel220825 bin]# sudo yum install nodejs npm --enablerepo=epel
Loaded plugins: fastestmirror, refresh-packagekit, security
Error getting repository data for epel, repository not found
[root@eel220825 bin]# curl --silent --location https://rpm.nodesource.com/setup | bash -
## Inspecting system...
+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release
+ uname -m
## Confirming "el6-x86_64" is supported...
+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub/el/6/x86_64/nodesource-release-el6-1.noarch.rpm'
## Downloading release setup RPM...
+ mktemp
+ curl -sL -o '/tmp/tmp.neTNsKUQ7v' 'https://rpm.nodesource.com/pub/el/6/x86_64/nodesource-release-el6-1.noarch.rpm'
## Installing release setup RPM...
+ rpm -i --nosignature --force '/tmp/tmp.neTNsKUQ7v'
## Cleaning up...
+ rm -f '/tmp/tmp.neTNsKUQ7v'
## Checking for existing installations...
+ rpm -qa 'node|npm' | grep -v nodesource
## Run `yum install -y nodejs` (as root) to install Node.js and npm.
## You may also need development tools to build native addons:
## `yum install -y gcc-c++ make`
[root@eel220825 bin]# yum -y install nodejs
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.nwsuaf.edu.cn
* extras: mirrors.nwsuaf.edu.cn
* updates: mirrors.nwsuaf.edu.cn
nodesource | 2.5 kB 00:00
nodesource/primary_db | 17 kB 00:00
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:0.10.40-1nodesource.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
nodejs x86_64 0.10.40-1nodesource.el6 nodesource 4.6 M
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 4.6 M
Installed size: 16 M
Downloading Packages:
nodejs-0.10.40-1nodesource.el6.x86_64.rpm | 4.6 MB 00:36
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID 34fa74dd: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
Importing GPG key 0x34FA74DD:
Userid : NodeSource <gpg-rpm@nodesource.com>
Package: nodesource-release-el6-1.noarch (installed)
From : /etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : nodejs-0.10.40-1nodesource.el6.x86_64 1/1
Verifying : nodejs-0.10.40-1nodesource.el6.x86_64 1/1
Installed:
nodejs.x86_64 0:0.10.40-1nodesource.el6
Complete!
[root@eel220825 bin]#