Install NodeJs on CentOS

September 19, 2014 | Updated last September, 2015 | 1034 views | Comments

Seven easy steps to install nodejs on CentOS.

Note: Node.js v0.12.7 will be installed. This has been specifically tested on CentOS 6.7 (Final)

Let's begin!

Run each command one by one and you are done.

# su
# yum groupinstall 'Development Tools'
# cd /usr/local/src
# wget https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
# tar zxvf node-v0.12.7.tar.gz
# cd node-v0.12.7
# ./configure && make && make install

 

Just suddenly, it's fully installed.

Read below for more detailed instructions with screen shots to guide the installation process of nodejs on CentOS for each command.

1. Log in as the root user.

Type su on the terminal.

# su

You will be asked to type the root password.

Just enter the root password and hit the enter key.

 

2. Install the Development Tools.

Type yum groupinstall 'Development Tools' on the terminal.

# yum groupinstall 'Development Tools'

Total download size will be shown, and you will be asked if this is ok. Just enter Y and hit the enter key.

Development Tools has been successfully installed when you see a similar message.

 

3. Go inside the folder /usr/local/src.

Type cd /usr/local/src on the terminal.

# cd /usr/local/src

 

4. Download nodejs.

Type wget https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz on the terminal.

# wget https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz

 

4. Extract the downloaded file.

Type tar zxvf node-v0.12.7.tar.gz on the terminal.

# tar zxvf node-v0.12.7.tar.gz

 

5. Go inside the folder of the extracted file.

Type cd node-v0.12.7 on the terminal.

# cd node-v0.12.7

 

4. Run configuration file and install nodejs.

Warning: This will take few minutes to complete.

Type ./configure && make && make install on the terminal.

# ./configure && make && make install

That's all!

NodeJs was successfully installed on CentOS.

 

What's next?

Check NodeJs installation by displaying it's version.

Type node -v on the terminal.

# node -v

 

Related Tutorials


Must Read