Login to your server, preferably as root or at least as sudo user.
We will need Node.js source file and not the compiled package. Download the source file to your server using,
Please note that at time of writing node.js version was 0.10.33. If you get error then go here and copy the link for source file download and replace above URL.
To compile this source, your GCC compiler should be there on your server,
sudo yum install gcc gcc-c++
Use above command without ‘sudo’ if you are root user.
Now, let’s extract and create directories for downloaded source,
tar xzvf node-v* && cd node-v*
After some extracted outputs, copy paste below command to enter the directory,
and then build the installer with make command,
Now, what will start is a very lengthy process and sometimes you will even feel that same thing is scrolling in front of you. It is like that never ending OS installations which were habitual in 90’s.
Whatever! As soon as this is finish, you will be back at prompt. Now install these newly created installations,
sudo make install
Don’t go anywhere. This one will be quick!
To check the successful installation and version, you can run below;
If you version number as below, then you can take it as everything was successful. (note: version number may vary)
Let me know of questions and suggestions.