Skip to content

Installation on Windows XP (through Portable Ubuntu TRES)

stagas edited this page Aug 6, 2010 · 13 revisions

This is a step-by-step guide on installing node.js inside Windows XP through Portable Ubuntu TRES:

1. Download and unpack Portable Ubuntu TRES (self-extracting).

2. Open config/portable_ubuntu.conf in your favourite text editor and add the following around line 61:

ports_to_redirect=tcp:8000:8000

3. Double-click to run pubuntu.exe.

4. Open up Terminal from the Applications/Accessories menu and type:

sudo gedit /etc/init.d/postmount_pubuntu.sh

The sudo password by default is: 123456

5. Replace line 52 with the following (this is to fix a nasty bug that freezes Portable Ubuntu TRES when launching for a second time):

echo >> /etc/fstab
echo "#Entry for cdrom" >> /etc/fstab
echo "/dev/cdrom /media/cdrom udf,iso9660 user,noauto,exec,utf8" >> /etc/fstab

6. Save and close gedit.

7. Still inside the terminal type the following (one line at a time):

sudo apt-get install g++ git-core libssl-dev curl apache2-utils
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install

That’s all! You now can run node.js by typing in the terminal:

node <your_app.js>

and you can go back to Windows and point your browser to http://127.0.0.1:8000 and it should work, provided you have the server listening to port 8000 (if you want to use another port you need to edit portable_ubuntu.conf as described in step 2). Here are a few Hello World examples with code to get you started quickly, and here is the list of available modules you can use with node.js to extend its functionality (frameworks, database connection, etc.) [Warning: Not all of them work with the latest version of node.js].


Extra Tips:

  • To share a folder between Windows and Portable Ubuntu edit portable_ubuntu.conf around line 38:
    shared_folder0=C:\your\folder
    and you should find it under the /media/ path in Ubuntu (always after restarting having edited the config file)
  • You should also deactivate the screensaver in Ubuntu by going to the System/Preferences/ScreenSaver menu because it might lock the menu and the windows you have opened with no way of gaining access again (another annoying bug).

Screenshot: