Recommended VPS Complete list of best VPS hosting providers.

Quickest Way To Install Node.JS on CentOS

Node.js has emerged becoming something familiar to many web developers and geeks but perhaps it is something a newbie never heard before, until then comes Ghost, a blogging platform focusing on publishing. People start to get to know what is it that Ghost can only be installed on it.

So how to easily install Node.js? I posted a tutorial about how to get it installed on Ubuntu server and today, here’s how to make it done on CentOS.

As always, I’ll try may best to put screenshot pic of every step. My purpose is simple, to make newbie confident following my guide without any hesitation.

Ingredients of this tutorial:

  1. A VPS, can be running on any virtualization and specs
  2. CentOS OS – I use CentOS 6.5 32-bit (you can also use 64-bit)
  3. Ability to use Putty (Windows) or Terminal (Linux, Mac)
  4. Basic knowledge about common bash command in Linux

The Steps

Step 1 – Login to your server as root or as user with root privilege:

2014-01-20_145756

Step 2 – It is always a good practice to firstly update Yum:

yum update -y

The process should take few minutes to complete. Pic:

yum update

Once done, you’ll see the complete message something like this:

2014-01-20_150314

Step 3 – Next, we may need to install necessary dependencies:

yum -y groupinstall "Development Tools"

pic:

install yum dependencies

Step 4 – This is how to install Git on CentOS 6.x, issue this command:

yum -y install git

Pic (in my example it is already installed):

install git

Step 5 – Now issue several command syntax below to start installing Node.js:

git clone git://github.com/joyent/node.git

pic:

install git

Next, now go to the node directory:

cd node

pic:

2014-01-20_152803

Next, let’s start the configuration,..

./configure

pic:

2014-01-20_152934

Now type make and hit Enter. This should take more than 5 minutes to complete. So sit back and enjoy your time. Grab a cup of tea or coffee if you wish.

make

pic:

make node js

Finally, issue this last command syntax to build up Node.js from its official Git that we’ve just cloned before:

make install

The process should take no longer than previous one. Once done you’ll see something like this:

2014-01-20_153743

Congratulation, you have installed Node.js successfully.

Now you can confirm which version of NodeJS is installed using command below:

node --version

pic:

2014-01-20_154046

As you can see above, the Node.js version installed is the newest version but it is not the latest stable version for public. According to http://nodejs.org/download/ current stable public version is v0.10.24 (the time of writing).

nodejs

As this tutorial done in Ubuntu, so do not forget to follow my previously outlined steps about basic CentOS VPS setup after following above tutorial.

Up next, how to install latest version of Node.js or to install a specific / certain version of it. Make sure you follow me on Twitter @servermomdotcom. Thanks

6 Comments

Add a Comment

Your email address will not be published. Required fields are marked *

Get more stuff like this
in your inbox

Subscribe and get interesting stuff plus faster updates to your email.