3 | | This wiki page documents how we install and maintain nodejs. Currently, an outdated version [http://packages.debian.org/sid/nodejs is packaged in sid]. Once a more recent version makes it to backports or stable, we should switch to the Debian package. |
4 | | |
5 | | Many applications are written as node packaged modules (npm) which all depend on node and on npm (which is a command line package manager for installing node packaged modules). |
6 | | |
7 | | Therefore, on any given server, we should provide both node and npm to all users on the system. |
8 | | |
9 | | However, we should never run npm as root (since it will pull in source code over potentially untrusted sources). |
10 | | |
11 | | By providing one (hopefully update-to-date) version of npm and node, we allow non-privileged users to install their various applications using npm making them happy and keeping our root owned directories secure. |
12 | | |
13 | | To install nodejs (which provides both node and npm): |
14 | | |
15 | | Change into the /usr/local/share directory. |
16 | | |
17 | | wget the [http://nodejs.org/download/ most recent binary release of node]. |
18 | | |
19 | | Untar the package and remove the .tar.gz file, but leave the node directory (with version information in the directory name). |
20 | | |
21 | | Create symlinks to both node and npm in /usr/local/bin |
22 | | |
23 | | * To do: we need a mechanism to keep these files update to date |
24 | | |
| 3 | nodejs is now maintained via the regular debian packaging (using wheezy-backports). |