Knowledgebase
Knowledgebase:
Installing Node.js On Your cPanel Account
Posted by Alexander Azzo, Last modified by Alexander Azzo on 21 February 2016 12:49 PM

Today we’re going to install node.js on your shared cPanel account, whether it would be on a OpenVZ, Xen, Cloud or Dedicated server through SSH (which is the only way you can install it).

First off, you need your SSH credentials, and access to your account. You can find the credentials in your hosting account setup email you received when you first signed up for the account. If you are having trouble logging in via SSH, you contact our support team for assistance by creating a ticket from our portal - https://portal.budgetvm.com

 

Let’s get started with the tutorial:

1) First off, SSH into your account. You can do this using a number of third party applications. I recommend using either xshell or putty.

2) Browse to your home directory by running the command below, replacing YOURUSERNAME with your hosting account user name:

 

 

cd /home/YOURUSERNAME

3) Next, run this command, and make sure it reports something like:
bzip2-devel-1.0.3-6.el5_5
bzip2-devel-1.0.3-6.el5_5

 

 

rpm -qa | grep bzip2-devel

 

4) Next, we are going to install Python 2.7.9 . This is required for node.js . First, we will run this command to download the package:

 

 

wget  http://python.org/ftp/python/2.7.9/Python-2.7.9.tgz

– Then extract the package running:

 

 

tar xzf Python-2.7.9.tgz

-Now we will browse to that folder, similar to step 1, by running:

 

 

cd Python-2.7.9

-And now we will configure the make file to prepare it for the installation:

 

 

./configure --prefix=$HOME --with-threads --enable-shared

– After you let that complete, run the make file by simply typing:

 

 

make

– Once that is done, run the install:

 

 

make install

– You then went to get out of that folder, so run:

 

 

cd ..

– Then run this so python can recognize the path:

 

 

export PATH=~/bin:$PATH

– Next, you want to edit the .bashrc file, located in /home/username . You can do this through an SSH text editor, or simply through file manager in your cPanel account. You need to add these two lines at the end of the file:

export PATH=~/bin:$PATH
export LD_LIBRARY_PATH=~/lib:$LD_LIBRARY_PATH

Save the file and run:

 

 

source ~/.bashrc

Finally Getting To Install Node.js

Now that we got Python 2.7.9 running on your account, you can finally go through the node.js install. It’s similar to python, but with less steps. Let’s start.

1) Download the package:

 

 

wget http://nodejs.org/dist/v0.10.1/node-v0.10.1.tar.gz

– Extract it:

 

 

tar xzf node-v0.10.1.tar.gz

-Browse to the new node.js folder:

 

 

cd node-v0.10.1

-Configuring the make file:

 

 

./configure --prefix=$HOME

NOTE: THE NEXT TWO COMMANDS BELOW WILL TAKE A WHILE.

-Running the make file to prepare the installation:

 

 

make

– And now running the installation

 

 

make install

2) Once all that is done, verify that node.js has been installed by running:

 

 

node -v

This should return: v 0.10.1 . This means you have successfully installed node.js! If you do not see it, please contact our support team for help.

 


Comments (0)