Skip to content

How to install Node.js on Windows XP via Portable Ubuntu Remix

dprize edited this page Sep 10, 2011 · 1 revision

This is a step-by-step guide on installing Node.js on Windows XP though Portable Ubuntu Remix:

1. Download and unpack Portable Ubuntu Remix.

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

ports_to_redirect=tcp:8000:8000

3. Double-click run_portable_ubuntu.bat to start Portable Ubuntu.

4. Open the terminal and type the following line:

sudo gedit /etc/resolv.conf

The sudo password by default is: 123456. Change the nameserver into a working DNS nameserver. I use Google’s Public DNS. If you want to use Google’s Public DNS replace what you see in resolv.conf with:

nameserver 8.8.8.8
nameserver 8.8.4.4

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

sudo apt-get install g++ git-core libssl-dev curl apache2-utils
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make
make install

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

node <your_app.js>

Open Firefox in Portable Ubuntu and type the url 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 and add:
    shared_folder0=C:\your\folder
    and you should find it under the /media/ path in Ubuntu (always after restarting having edited the config file)

Screenshot:

Clone this wiki locally