Quick Node installation

I’ve used several methods of installing Node.JS, including the RPM-Build approach, but by far the path of least resistance is the following simple recipe I use for my RH/CentOS systems:

First pay a quick visit to http://nodejs.org/dist/ to determine the latest version of Node (denoted X.X.X below). Then, as root, proceed as follows:

    yum install gcc gcc-c++ autoconf automake
    yum install openssl openssl-devel
    cd /opt
    mkdir node-install
    curl http://nodejs.org/dist/node-vX.X.X.tar.gz | tar -xzf - -C node-install
    cd node-install/*
    ./configure
    make install
    PATH=/usr/local/bin:$PATH     (assuming installation went into /usr/local/bin)
    curl http://npmjs.org/install.sh | sh

I sometimes put Node.JS in /opt, but /usr/local or somewhere similar will do, so long as it’s in your path. After “make install” you can use “whereis node” to verify.

(At the time of writing, X.X.X = 0.6.8)

Categorised as: Coding

Comment Free Zone

Comments are closed.