Installing Node.js on Rackspace Cloud Server is quite easy if you follow our easy step by step guide. It will take hardly few minutes for Installing Node.js. Node.ja is getting quite popular due to its flexibility as a serverside software package and lot of Open Source free softwares and Apps are available to run on a server having the setup of Node.js.
Initial Steps for Installing Node.js on Rackspace Cloud Server
We will use Next Generation Cloud Server from The Rackspace Cloud for this guide on Installing Node.js on Rackspace Cloud Server. The Server we spin up for this guide for Installing Node.js on Rackspace Cloud Server is a Ubuntu 12.04 LTS (Precise Pangolin) server with 2 GB of RAM. We are avoiding the basic steps on how to build a server on Rackspace Cloud as we have written them in various guides, if you are a new user, simply follow the initial steps from this guide :
Follow up to the step where we have written “Your username is root (so login as root) and the Password is that you have copied” with a screenshot of PuTTY as SSH/ Telnet client wth the first screenshot of a black screen of PuTTY. We will start the proper steps of this guide for Installing Node.js on Rackspace Cloud Server right from here. If you have never used PuTTY, you can follow to know the basics of PuTTY. For Mac OS X or Linux, you can use the Terminal, except the way to login, all steps and commands will be the same. The reason we show Windows is, it appears to us, most users still uses Windows OS, otherwise it would be easier for us to use Mac to show the commands.
So you have got an IP and Password. Login :
First Open the sources.list and we need too uncomment few sources to make them active as Rackspace uses own repo for 12.04 LTS :
sudo nano /etc/apt/sources.list
Here it should look like this :
Note : Uncomment means making a non functioning line active. For example, the last line was :
# deb-src http://extras.ubuntu.com/ubuntu precise main
and I have removed the space and hash sign before it to make it active :
deb-src http://extras.ubuntu.com/ubuntu precise main
Update it :
sudo apt-get update
After the update is complete, it is better to perform a soft reboot, although it is not mandatory. This small practices keeps the server running fine years after years.
I am installing using one command :
sudo apt-get install build-essential curl
You can individually install them like sudo apt-get install build-essential and sudo apt-get install curl commands. What I want to say, that black screen is actually quite friendly, if you can practice a bit, this is the magic of any UNIX Like OS.
I need to halt a bit, because the need for all for installing node.js is not the same, there are at least 11 ways, it depends how you will deploy the app and how basically you want to work. Here are some of them :
Again I am using a combined command :
sudo apt-get install git python libssl-dev
Please note, if you use -y after any command for apt get install, you do not have to accept with pressing y manually, you can install in this way for example :
sudo apt-get install git python libssl-dev -y
Please try to understand. If you can not understand use WinSCP like SFTP software to open and see the folders in real, graphically. We are on the root, but we need to change our location to src :
We will make a directory named node :
sudo mkdir node
Please understand what we are doing in this guide for Installing Node.js on Rackspace Cloud Server. If you blindly copy paste the commands, it will work, but you will not learn. For not learning those cPanel like your favorite hosting panels are making millions.
Go to node directory :
We are on node directory. wget the node.js :
sudo wget http://nodejs.org/dist/v0.8.9/node-v0.8.9-linux-x64.tar.gz
Please apply your common sense. Go to node.js website and check the latest version. When this is written, we took the url from – http://nodejs.org/download/
untar it :
sudo tar -xzvf node-v0.8.9-linux-x64.tar.gz
Go to that folder :
If you can not compile, please use, previous version :
sudo wget http://nodejs.org/dist/v0.6.17/node-v0.6.17.tar.gz
sudo tar -xzvf node-v0.6.17.tar.gz
This the best command :
Run this command :
Install it :
sudo make install
It will take time to execute make and install. Yes, we have completed Installing Node.js on Rackspace Cloud Server. You can download any app and run.