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:
- 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
The Steps
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"
pic:
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
pic:
Next, now go to the node directory:
cd node
pic:
Next, let’s start the configuration,..
./configure
pic:
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:
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:
Congratulation, you have installed Node.js successfully.
Now you can confirm which version of NodeJS is installed using command below:
node --version
pic:
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
Hi, i want to install uptime script redotheweb.com/uptime/
Can i install node.js and mongodb, im using vestacp on my vps. Is that make any problem thanks.
I think it’ll be fine to run nodejs along side with other web server’s running, but make sure it bind to different port 🙂 however I never tried it my self
Hello
I have tried several different methods to install node & npm on 64-bit centos 5.8 with python 2.4.3, including node-v0.10.17, node-v0.10.26-linux-x64 . All have run into errors at configure stage, yours produced this message:
File “./configure”, line 452
o[‘default_configuration’] = ‘Debug’ if options.debug else ‘Release’
I *think* I may need to install a higher version of python using altinstall.
Can you suggest any other workarounds?
Thanks
Mike
Excellent guide. Thanks a lot.
Very useful post. Thanks guy!
I can run node.js as service of nginx?