Refer to official documentation Https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
Enterprise Linux (RHEL, CentOS, Fedora, etc.)
Node.js and NPM are available from the Extra Packages for Enterprise Linux (Epel) repository.
To check if you have Epel registered, run: Check if the Epel is installed
Yum Repolist
If you don ' t see Epel, install it via yum: If Epel is not seen in the results, install via the yum command
For Enterprise Linux version 6 (Epel version 6.8 in the time of writing): If your version is centos6.x please use the following command
Yum install \
http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
For Enterprise Linux version 7 Beta: If your version is centos7.x please use the following command
Yum install \
http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm
Then Install the Nodejs and NPM packages: Install Nodejs and NPM after installing the above environment
sudo yum install Nodejs npm--enablerepo=epel
Installation Successful
Install using the compiled source code. The following installation failed
First to install GCC, # yum install gcc
1. Download Nodejs, nodejs website download: http://nodejs.org/download/
# wget http://nodejs.org/dist/v0.10.30/node-v0.10.30-linux-x64.tar.gz
2. Unpack the installation package
# tar ZXVF node-v0.10.30-linux-x64.tar.gz
3. View the environment and installation documentation that you want to configure
# CD Node-v0.10.30-linux-x64
# VI Readme.md
4.