Node.js : installation standalone

Posté le samedi 14 avril 2012 à 5 h 02, Read it in english with Google

nodejs-logo-lightAllez c’est partit pour un premier article rapide : comment installer Node.js en mode standalone, ou mode portable, c’est Ă  dire sans l’intĂ©grer au système.

Ceci peut vous permettre de le faire tourner sur des hĂ©bergement oĂą vous n’avez pas la main, si tant est que les librairies requises soient disponibles. Vous pouvez mĂŞme le compiler chez vous et l’exĂ©cuter sur le serveur si les noyaux sont semblables, car Nodejs n’a besoin de rien d’autre que lui mĂŞme pour tourner.

PrĂ©alablement, installez les librairies requises (ici on est sur Debian, je vous laisse vous reporter Ă  d’autre articles pour les diffĂ©rents systèmes):

apt-get install python build-essential libssl-dev

Vous tĂ©lĂ©chargez la dernière version et vous la compilez, sans l’intĂ©grer au système (pas de make install):

mkdir nodejs
cd nodejs
tar xzf
cd node-v0.6.14

Maintenant vous pouvez lancer Nodejs avec, tout simplement :


En ce qui concerne le gestionnaire de paquet de Nodejs : npm, c’est un peu plus compliquĂ©.

Il faut créer un script dans le répertoire de Node :

echo '#!/bin/sh
node=`dirname "$0"`/node
$node "`dirname "$0"`/deps/npm/bin/npm-cli.js" "$@"
> npm
chmod +x npm

Vous pouvez maintenant lancer npm avec la commande


Attention tout de mĂŞme avec les paquets installĂ©s globalement (avec l’option -G), ils se mettent dans le rĂ©pertoire au dessus. Mais la nouvelle phylosophie sur les paquets de node tend Ă  les distribuer localement, par application (dans le rĂ©pertoire node_modules Ă  la racine de votre app).

Au final, on pourrait même créer un script qui installe automatiquement la dernière version de Nodejs dans le répertoire /node et crée/met à jour des liens symboliques de node et npm dans ce même répertoire, pour pouvoir toujours garder Nodejs à jour.

Bon, j’ai encore des choses Ă  revoir dans ma mĂ©thode de rĂ©daction d’un article court.

16 réponses à “Node.js : installation standalone”

  1. Felix Pantaleon

    Believes that the USA poker market is in a much wanted transition part.

    The Black Friday occasion and the media frenzy that ensued
    were stepping stones in the direction of a regulated poker surroundings.
    And legalization could be across the corner. On October 25th 2011, a congressional hearing occurred on the Home Subcommittee on Commerce, Manufacturing and Commerce.

  2. bao da ipad

    After looking at a handful of the blog posts on your web page,
    I honestly like your way of writing a blog. I saved it to my bookmark site list and will
    be checking back soon. Please check out my web site too and let me know how you feel.

  3. iphone

    Your style is unique compared to other people I’ve read stuff from.
    Thanks for posting when you have the opportunity, Guess I will
    just book mark this site.

  4. Elvia

    Useful info. Lucky me I discovered your web site by chance,
    and I am shocked why this accident did not happened in advance!
    I bookmarked it.

  5. vis inox terrasse

    Bonjour. Cet article est très informatif. je voulais
    notamment des réponses sur le sujet. Merci

  6. Clash of Clans gemmes gratuites pour android

    I read this piece of writing completely about the comparison of most up-to-date
    and previous technologies, it’s amazing article.

  7. poker online

    If you desire to get much from this post then you have to apply these strategies to
    your won webpage.

  8. capsa susun online

    Hi, i believe that i noticed you visited my blog so i got
    here to return the prefer?.I’m trying to to find things to improve my website!I assume its ok to make use
    of a few of your concepts!!

  9. Master agen domino

    What’s up colleagues, its fantastic post regarding teachingand fully explained, keep it up all the

  10. Watch Jav HD Online Free

    Hey, I think your site might be having browser compatibility issues.
    When I look at your website in Chrome, it looks fine but when opening in Internet
    Explorer, it has some overlapping. I just wanted to give you a quick heads up!
    Other then that, great blog!

  11. ?i?n

    Ban ch? nhi?m b? mĂ´n Thi?t b? ?i?n – ?i?n t?.


    Great beat ! I would like to apprentice whilst you amend your site, how
    could i subscribe for a blog web site? The account helped me a appropriate deal.

    I were a little bit acquainted of this your broadcast
    provided bright clear concept

  13. Maxsimjoymn

    ?82.?? ???????? ???? ?????? ? ???????????, ?? ????????!


    I am truly delighted to glance at this website posts which carries lots of helpful information, thanks for providing these kinds of information.


    Having read this I thought it was really informative.
    I appreciate you spending some time and effort to put this content together.
    I once again find myself spending way too much time both reading and commenting.
    But so what, it was still worth it!

  16. BestBrodie

    I have noticed you don’t monetize your website, don’t waste your traffic,
    you can earn additional bucks every month. You can use the best adsense
    alternative for any type of website (they approve all websites), for
    more info simply search in gooogle: boorfe’s tips monetize your

Laissez un commentaire :