InMotion Hosting Support Center
Discussions on this article:

In this guide I'll show you how to install Node.js on either your VPS or dedicated server. Node.js is a server-side JavaScript framework built off the V8 JavaScript engine from Google Chrome that allows for event-driven, asynchronous I/O requests to help handle a large amount of concurrent requests efficiently.

You need root access to either your VPS or dedicated server in order to follow along with these steps.

Installing Node.js

Using the steps below you should be able to quickly install Node.js on your server, and begin testing commands directly on the server via the interpreter, or begin writing applications to run.

  1. Login to your server as the root user via SSH.
  2. You need to check for some software dependencies for Node.js, as it requires OpenSSL, Python2.6+, and a compiler like gcc. You can check for these with the following yum commands:

    yum list installed | egrep "openssl-devel|python26|python27|gcc-c++"

    You might get output back like this:

    gcc-c++.x86_64 4.4.7-3.el6 @base
    openssl-devel.x86_64 1.0.0-27.el6_4.2 @updates

    On this particular server, we already have our gcc-c++ compiler, and the openssl-devel package installed. So we just need to install Python 2.6, or verifiy if it's already on the server and not installed via yum.

    Check Python version or install Python 2.6

    If you're on a newer VPS or dedicated server you should be running CentOS 6.x, you can confirm this by running the following command:

    cat /etc/redhat-release

    Which should return:

    CentOS release 6.4 (Final)

    Older servers would instead return something like:

    CentOS release 5.9 (Final)

    Now check your Python version with this command:

    python --version

    You should get back something like:

    Python 2.6.6

    If you're on an older server, and your Python version is older than 2.6, run the following command to install Python 2.6:

    yum install python26

    If either the gcc-c++ compiler, or the openssl-devel package were also missing when you checked, you'd run one of the following to install those dependencies:

    yum install gcc-c++
    yum install openssl-devel

  3. Now you want to navigate to your server's source directory:

    cd /usr/local/src

  4. Grab the latest copy of Node.js:


  5. Extract the Node.js archive:

    tar zxvf node-latest.tar.gz

  6. Navigate to the Node.js directory:

    cd node-v*

  7. Now finally configure and install Node.js with this series of commands:

    python2.6 configure
    make PYTHON=python2.6
    make install

    Upon a successful installation, the last few lines should look like this:

    installing /usr/local/lib/node_modules/npm/scripts/
    symlinking ../lib/node_modules/npm/bin/npm-cli.js -> /usr/local/bin/npm
    updating shebang of /usr/local/bin/npm to /usr/local/bin/node

  8. Finally you can test your Node.js installation by simply calling the node interpreter, running a few basic JavaScript commands, then hitting Ctrl-C on your keyboard twice in a row to exit:

    root@server [~]# node
    > a = 3;
    > b = 2;
    > a + b;
    (^C again to quit)

You should now have a successful installation of Node.js running, and in further guides we'll go more in-depth with some of the amazing things you can do with Node.js!

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

n/a Points
2017-09-18 4:31 pm

The best way to get around the g++ version issue is to install and use devtoolset-6. Very easy instructions included at the link.

n/a Points
2017-08-15 7:04 pm

Nice article ! i have a resller account nd i want to install node js . when i login to AMP i didn't found the root user config so i have one question is reseller account support installing node js ? thnk's in advance

2,863 Points
2017-08-15 7:09 pm
Hello! Our reseller accounts do not include root access. A VPS/Dedicated server is required for installation of node.js. I hope this helps.

Carlos E
n/a Points
2016-12-14 6:40 am

Hi guys,

I tried the above tutorial that is excellent, but i could not get the build to compile through the wget installation. So, being on CentOS (VPS plan), I did something a little different that worked. I am hereby sharing it, so just in case somebody needs it, they can also try it.

As root:

# curl --silent --location | bash -# yum install -y nodejs
n/a Points
2017-02-27 11:34 am

This works and much easier that the above steps which also created a problem for me. It's much faster, and npm also installs.

n/a Points
2016-12-06 7:04 am

Im getting the same problems as others

root@ded [/usr/local/src/node-v7.2.0]# yum list installed | egrep "openssl-devel|python26|python27|gcc-c++"

gcc-c++.x86_64                                   4.4.7-17.el6          @base

openssl-devel.x86_64                             1.0.1e-48.el6_8.3     @updates


At step 7

WARNING: C++ compiler too old, need g++ 4.8 or clang++ 3.4 (CXX=g++)

then if I try to update the compiler I get

Package gcc-c++-4.4.7-17.el6.x86_64 already installed and latest version


So basically at a standstill.

n/a Points
2016-08-13 1:57 pm
Hi, I am following the steps trying to install node.js, however when y get to the line: python2.6 configure , I get this warning: WARNING: C++ compiler too old, need g++ 4.8 or clang++ 3.4 (CXX=g++) creating icu_config.gypi But acoording with the support team the gcc 4.8 is already installed but in a very strange and hard to find folder, could you please tell me what can I do to go ahead with the installation using that folder? or should I install is some where else? Thanks a lot
n/a Points
2016-03-14 5:56 am

I checked the python version and told me 2.6.6!

when i type node it told me command not found.....

Then i try to install nodejs but it doesn't works... what i missed?



43,761 Points
2016-03-14 5:49 pm
Did you run the command: yum list installed | egrep "openssl-devel|python26|python27|gcc-c++"

If so, what was your output?
n/a Points
2016-02-11 6:00 am

Saved me hours of work. Great Work

13,821 Points
2015-11-05 9:10 am
Hello Vaggouras,

To install Node.js you have to be on a VPS or higher. You will need to upgrade accordingly.


Tim S
n/a Points
2015-11-05 7:47 am


I have a pro plan. Can I install Node.js or should I upgrade?


n/a Points
2015-10-23 6:54 pm

Have these instructions been tested on CentOS 6.7? I'm getting errors at step 7. Wondering if the newer CentOS version coupled with gcc 4.4 might be a problem...

10,077 Points
2015-10-26 9:50 am
Hello Lindsey,

No these steps have not been tested on CentOS 6.7 at this time. Are you getting errors during the installation?

Best Regards,
TJ Edens
n/a Points
2015-10-26 4:49 pm

Yes indeed. Things are successful until I run python2.6 configure, which returns the following error:


WARNING: C++ compiler too old, need g++ 4.8 or clang++ 3.4 (CXX=g++)


I followed the steps on this page and was able to get node running.


n/a Points
2015-10-28 11:35 pm

I just tried this and got the same error as Lindsey Bohland. The instructions at her link did bring much joy though, so she has my gratitude and admiration. And, fwiw, these install instructions for CouchDB on CentOS 6.7 also worked for me today, so my joy was doubled with Lindsey's post here. Thank you all for sharing!!!



n/a Points
2015-10-29 12:29 pm

I guess I forget to include the link to the build instruction for CouchDb. You can find them here:

43,761 Points
2015-09-28 3:04 pm
Is there any error message that appears?
n/a Points
2015-09-28 6:55 pm

No, just show one jump of line

43,761 Points
2015-09-29 6:30 am
Hello Kelvin,

Odd, we did not have that experience. Since I cannot duplicate I can only take a stab at it. Here is a link to a help article, it is on a MAC device, but the situation could possibly help you as well.

Kindest Regards,
Scott M
n/a Points
2015-09-25 11:33 pm

Good day.

I installed nodejs according to the tutorial, I want to run npm and shows no options.

What did I do wrong?


Thank you very much for your help.

43,761 Points
2015-09-28 1:29 pm
Hello Kelvin,

Did you install npm after installing node?

Kindest Regards,
Scott M
n/a Points
2015-09-28 1:53 pm

Hi Scott,Yes, I install nodejs and npm, when I execute the command npm install forever, dont shows the action.


n/a Points
2015-08-18 5:06 pm

Does npm work on inmotion VPS with nodejs installed? What about github integration?




10,077 Points
2015-08-19 10:41 am
Hello Naga,

Yes npm works and you can install git as well to incorporate githubs repos.

Best Regards,
TJ Edens
n/a Points
2015-01-18 7:55 am

How do you set it up so if the server reboots it will auto start?


42,232 Points
2015-01-19 2:52 pm
Hello Dustian,

Thanks for the question! This is not an uncommon question with the Node.JS community. They recommend either an "upstart" script (Linux) or something called "Forever". You can find the particulars discussed here (how to automatically restart a node server) . There are other options as well, but you can find them by using your favorite search engine. I hope this helps to answer your question, please let us know if you require any further assistance.

Arnel C.
n/a Points
2014-12-14 10:00 am

Just to concur with Jim B - I also had problems connecting as an outside user (via multiple proxies) but no problem connecting from my static IP, because the IP is allowed for root access. I had to edit the apf file to add the relevant port so, if anyone gets stuck, this link is your friend:

n/a Points
2014-09-08 4:46 am

Thanks to Scott M. You have shared useful info about installing Node.js.


n/a Points
2014-08-21 12:32 pm

I would like to add that the above instructions worked perfect. After many hours of experimenting with my server.js file and index.html files accessing an MYSQL DB, locally I was able to get it to work in a web browser, (VPS Hosting). Others around the country trying through the index.html I created would connect but not receive any data from the SQL DB. Unable to resolve after several days of trying I contacted support via chat. Thanks to the excellent support team (Chris R) he suggested: 

Open Ports in APF:

Followed the instructions in the link he gave, I added the port I wanted to use. Everything is working perfect now across the country and locally, including over 3g and 4g. There are many examples on the internet on how to utilize node.js and no one seems to pick the same port for their examples for listening or sending so this threw me off even more. I hope this info helps someone and saves them hours of troubleshooting.

As a side note: I had asked Chris R what port does Inmotion or you recommend to use, he responded: “I have found in online references that 8124 is the common port used although you can set up custom ports on VPS platform if needed” I did use another port but might switch it to 8124.

n/a Points
2014-07-31 6:50 am

Great nodejs installation guide!!! Super useful!


Question: Do I need Root Access?

n/a Points
2014-07-27 8:46 pm

Great article - Thanks.Is it possible that Node can be installed by a domain user for a particular domain that has SSH access, so thay can install packages like Grunt and build a workflow without having to do it as root.

43,761 Points
2014-07-28 8:06 am
Hello Neil,

Installing node.js unfortunately needs to be done with the root user. Even with SSH access they would nee the root level permissions.

Kindest Regards,
Scott M

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

33 Questions & Comments

Do I need Root Access?

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!