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):

 

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

 

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 :

span class="st0">'#!/bin/sh
node=`dirname "$0"`/node
$node "`dirname "$0"`/deps/npm/bin/npm-cli.js" "$@"
'

Vous pouvez maintenant lancer npm avec la commande

./npm

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.

12 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.
    Rep.

  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 support.apple.com/iphone/restore

    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. Judi Poker

    Simply want to say your article is as astonishing.
    The clearness in your post is simply great and i could assume
    you are an expert on this subject. Well with your permission let me to grab your feed to keep updated with forthcoming post.
    Thanks a million and please continue the gratifying work.

  6. bandar389

    Pretty! This was an incredibly wonderful article.
    Thank you for providing these details.

  7. https://ombakqq.dewalego.com

    These are actua?ly enormous ideas ?n regarding blogging.
    ?ou ha?e touched som? ?ood factors ?ere. Anyy way keeep ?p wrinting.

  8. Bukadepoxito

    There are a lot of bookies in Indonesia who have been motivated to near their businesses previously Indonesia
    adopted a feign that prohibits all forms of
    gambling. Because of this phenomenon and is supported
    by technological advances that are certainly rapid, in the past next all gambling comings and
    goings are no longer carried out freely and isolated shaped online such as online soccer betting or online casino.

    Progress is not without challenges, because the easier admission to information technology,
    many irresponsible people begin to acknowledge advantage.
    Looking for pension by scouting gambling agents and utilizing the fans
    of gambling off protect by scamming, fraud, phishing, etc.

    Different from Us! Our ascribed site only gives members
    right of entry to soccer gambling and online casino games
    that have been proven safe and reliable. Gambling games from gambling game provider sites that we
    offer, have a categorically fine reputation, both in terms
    of the system and its services to customers.

  9. agenmaxbet.net

    Userbola is a reliable maxbet agent that has collaborated with official maxbet providers since 2014.
    All of us are tasked with serving betting players who wish to
    register for an established maxbet account in Indonesia.
    We here as a maxbet list site also have an recognized PAGCOR license to market online gambling video games.
    In addition, Userbola as a maxbet agent always gets positive input from betting members
    such as fast deal services, safe repayments and complete gambling games.

    The data of members who have registered at a trusted maxbet
    agent userbola are also protected securely. The userbola team also always provides benefits to all betting members every week
    such as a rebate reward or cashback that you will not
    get on the official maxbet site. From the evaluation of our betting users and
    official providers who may have made userbola the quantity 1
    trustworthy maxbet agent in Indonesia.

    How to Register a Maxbet Account
    Gambling online players who want to register for a maxbet account through the
    trusted maxbet list site userbola only need some important data like the full name in line with the bank-account, account number, contact number that can be contacted,
    and email address. These data can be completed via the enrollment form on our
    website.

  10. ss youtube video kaise download

    Copy the Shorts video link, visit a YT Shorts download website such as
    SSYouTube.com and begin saving the video.

  11. MPOBIG daftar

    WOW just what I was searching for. Came here by searching for ajax

  12. rox casino ??????????? ????

    ???? ??????? ?????? ??????????? ??????? 1000 ??????, ??? ????? ????????
    ????? ?? ???????????. ??????????? ??????? ?? ??????? ?????????? ?? 500 ??????, ?
    ?????? ?? ?????????? ??????? ???????????.
    ??? ?????? ??? ????? ???????, ?? ??????? ?????? ??????? ? Rox Casino.
    ????? ????????, ??? ?????? Rox ??
    ??????? ???????? ?? ?????????? ?????, ?
    ????? ?? ???????? ?????????????? ????? ???
    ?????? ?????? ???????? ?? ???????.
    ?? ?????? ??????? ???? ? ?????? ? ????, ?????? ???????? ? ???????? ??????.
    ?? ?????? ???? ???????, ???
    ???? ?????? ????? ? ????????????.

    ????????? ??????? ? ????? ?? ?????? ?????????? ????????,
    ???? ??? ????? ????? ????? ???? ?????????????????? ?? ??????? ?????.
    ?????????? ???????? ?? ?????? ???? ??????? ?????? ?????????? ?
    ??????? ?????????? ?????, ????? ???? ?????
    ????? ?????? ?????? ?? ??????.
    ??? ???????? ???????? ????? ?? ????.
    ????? ????? ?? ??????? ?????????
    ???? ??????? ???? ??????? ??? ??? ????????.
    ????? ???? ??? ??? ?????????, ???????
    ?????? «???????????». ????? ???
    ?????? ???????????? ?????? ?????? ?
    ?????? ???????.

Laissez un commentaire :