Debian Tutorials

Debian Tutorials


Step by step tutorials showing you how to install and configure various applications and services on Debian based Linux distros.

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories


How to install node.js on squeeze or wheezy

Ástþór IPÁstþór IP

Node.js is a server-side software system designed for writing scalable Internet applications, notably web servers. Programs are written on the server side in JavaScript, using event-driven, asynchronous I/O to minimize overhead and maximize scalability.

Node.js contains a built-in HTTP server library, making it possible to run a web server without the use of external software, such as Apache or Lighttpd, and allowing more control of how the web server works. Node.js enables web developers to create an entire web application in JavaScript, both server-side and client-side.

These instructions and tested and fully working on both squeeze and wheezy.

1. Install packages required to compile the source code

apt-get install build-essential

2. Download the latest source code from nodejs.org

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

3. Extract the tar archive

tar zxvf node-v0.10.9.tar.gz

4. Enter the directory we just extracted from the tar archive

cd node-v0.10.9

5. Compile and install

./configure
make
make install

6. Test node.js to make sure it’s working correctly

echo "console.log('Hello World');" | node

This should simply print “Hello World” in the console. If you don’t get any errors, node.js is installed and functional and you may just have executed your first node.js script.

Comments 3
  • barry
    Posted on

    barry barry

    Author

    I don’t think this works. when I did issued MAKE it went on forever spewing out the same output for about 20 minutes pages upon pages of the following.
    g++ ‘-DENABLE_DEBUGGER_SUPPORT’ ‘-DENABLE_EXTRA_CHECKS’ ‘-DV8_TARGET_ARCH_X64’ -I../deps/v8/src -Wall -Wextra -Wno-unused-parameter -pthread -m64 -fno-strict-aliasing -O2 -fno-strict-aliasing -fno-tree-vrp -fno-rtti -fno-exceptions -MMD -MF /home/barry/node-v0.10.9/out/Release/.deps//home/barry/node-v0.10.9/out/Release/obj.target/v8_nosnapshot/gen/experimental-libraries.o.d.raw -c -o /home/barry/node-v0.10.9/out/Release/obj.target/v8_nosnapshot/gen/experimental-libraries.o /home/barry/node-v0.10.9/out/Release/obj/gen/experimental-libraries.cc


  • barak
    Posted on

    barak barak

    Author

    barry, that is compiler output.


  • maltris
    Posted on

    maltris maltris

    Author

    Thanks for this, worked very well. 🙂

    node.js is pretty good, im currently learning it and needed an install on localhost at Debian Wheezy and didnt want to use sid-Packages.