Installing Node.js on Hostmonster / Bluehost Accounts
Important You will require SSH/Shell Access.
You will also require Git to be installed. Installing Git on Hostmonster / Bluehost Accounts
1. Create the directory to store the Node binaries
mkdir -m 755 node creates the folder used to store the Node.js binaries
2. Download & Compile Node.js
I like to keep all my Git downloads organized and the following tutorial is going to follow my convention on folder structures.
cd downloads/git
git clone http://github.com/joyent/node.git
You want to use HTTP over GIT as Hostmonster / Bluehost have the Git socket blocked.
Because Hostmonster / Bluehost are shared server we need to specify where to have the Node.js binaries stored
cd node Bring us to the Node.js source files
/configure —prefix=/home/{username}/node
make && make install
Replace {username} with your login name for Hostmonster / Bluehost. You can find your username in the cPanel on the left where it says username.
3. Now we need to make the node command usable so do the following commands
cd ../.. puts us back at the root of our home folder
nano .bashrc
4. Now add the following line to the bottom of the file.
export PATH=/home/{username}/node/bin:$PATH
Replace {username} with your login name for Hostmonster / Bluehost. You can find your username in the cPanel on the left where it says username.
5. Save
ctrl+x confirm save by typing ‘Y’ then enter, then enter again to confirm the file.
6. Lets verify that everything is working. You will need to reload bash
source .bashrc
7. Now verify that node is installed and running
node —version
Update:
To Start Node.js can be found here http://www.nodejs.org/ but for an internet user to access it you will need a dedicated ip address and the port open.
In most cases it would be something to similar:
node server.js