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:
- A VPS, can be running on any virtualization and specs
- CentOS OS – I use CentOS 6.5 32-bit (you can also use 64-bit)
- Ability to use Putty (Windows) or Terminal (Linux, Mac)
- Basic knowledge about common bash command in Linux
Step 1 – Login to your server as root or as user with root privilege:
Step 2 – It is always a good practice to firstly update Yum:
yum update -y
The process should take few minutes to complete. Pic:
Once done, you’ll see the complete message something like this:
Step 3 – Next, we may need to install necessary dependencies:
yum -y groupinstall "Development Tools"
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):
Step 5 – Now issue several command syntax below to start installing Node.js:
git clone git://github.com/joyent/node.git
Next, now go to the node directory:
Next, let’s start the configuration,..
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.
Finally, issue this last command syntax to build up Node.js from its official Git that we’ve just cloned before:
The process should take no longer than previous one. Once done you’ll see something like this:
Congratulation, you have installed Node.js successfully.
Now you can confirm which version of NodeJS is installed using command below:
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).
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